/* Professional Portfolio Styles for Sergei Grigorev */

:root {
  --primary-navy: #1e3a8a;
  --secondary-blue: #3b82f6;
  --accent-blue: #60a5fa;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-light: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-secondary);
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-navy);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-blue), var(--accent-blue));
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-blue);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><polygon points="0,100 1000,0 1000,100"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 3rem;
  font-weight: 700;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.hero-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navigation */
nav {
  background: var(--background-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--secondary-blue);
  background-color: var(--background-accent);
}

/* Better anchor positioning to account for sticky nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Main Content */
main {
  padding: 3rem 0;
}

section {
  margin-bottom: 4rem;
}

.section-content {
  background: var(--background-primary);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

/* Experience Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--secondary-blue), var(--accent-blue));
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  background: var(--secondary-blue);
  border: 3px solid var(--background-primary);
  border-radius: 50%;
  transform: translateX(-50%);
}

.timeline-company {
  font-weight: 600;
  color: var(--primary-navy);
  font-size: 1.1rem;
}

.timeline-role {
  color: var(--secondary-blue);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-period {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--background-accent);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}

.skill-category h4 {
  margin-bottom: 1rem;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.skill-item:last-child {
  border-bottom: none;
}

.skill-name {
  font-weight: 500;
  color: var(--text-primary);
}

.skill-level {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cert-item {
  background: var(--background-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.cert-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.cert-title {
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.cert-issuer {
  color: var(--secondary-blue);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cert-year {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--background-primary);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.contact-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--secondary-blue);
  width: 2rem;
  text-align: center;
}

.contact-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--primary-navy);
}

.contact-info a {
  color: var(--secondary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-info a:hover {
  color: var(--primary-navy);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .section-content {
    padding: 1.5rem;
  }
  
  .timeline {
    padding-left: 1rem;
  }
  
  .timeline-item {
    padding-left: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .skills-grid,
  .cert-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}