/*!
 * Modern CV Styles
 * Enhanced version with better responsiveness and modern design
 */

:root {
  --primary-color: #222;
  --secondary-color: #444;
  --accent-color: #888;
  --text-color: #111;
  --text-muted: #666;
  --background-color: #fff;
  --card-background: #f7f7f7;
  --border-color: #ccc;
  --shadow: none;
  --shadow-hover: none;
  --border-radius: 0;
  --transition: all 0.2s ease;
  --header-gradient: none;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--background-color);
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.25rem; }

/* Header Section */
.header {
  background: #222;
  color: #fff;
  border-radius: 0;
  box-shadow: none;
  padding: 4rem 0;
  margin-bottom: 3.5rem;
}

.header h2 {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: #222;
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.header h5 {
  font-size: 1.5rem;
  opacity: 0.95;
  font-weight: 500;
  position: relative;
  z-index: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Links Container */
.link-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.5rem;
  position: relative;
  z-index: 1;
  justify-content: flex-start;
}

.link-container a {
  display: flex;
  align-items: center;
  background: #fff;
  color: #222;
  text-decoration: none;
  transition: var(--transition);
  padding: 0.65rem 1.25rem;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.link-container a:hover {
  background: #eee;
  color: #111;
  box-shadow: none;
}

.link-container img {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  filter: brightness(0) invert(1);
}

/* Cards */
.card {
  background: #f7f7f7;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 2.5rem;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--secondary-color);
  border-radius: 0;
}

.card-header {
  background: white;
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.card-title {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.5rem;
}

.card-body {
  padding: 2rem;
  background-color: rgba(249, 250, 251, 0.5);
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0 !important;
  margin-right: 0.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.025em;
  box-shadow: none !important;
  background: #444 !important;
  color: #fff !important;
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-primary {
  background-color: var(--secondary-color);
  background-image: linear-gradient(135deg, var(--secondary-color), rgba(59, 130, 246, 0.8));
}

.badge-secondary {
  color: var(--primary-color);
  background-color: rgba(224, 231, 255, 0.7);
  border: 1px solid rgba(199, 210, 254, 0.8);
}

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

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-category:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, transparent, rgba(236, 240, 255, 0.4));
  border-radius: 0 0 0 100%;
}

.skill-category h4 {
  color: var(--primary-color);
  margin-bottom: 1.25rem;
  border-bottom: none;
  padding-bottom: 0.5rem;
  display: inline-block;
  position: relative;
}

.skill-category h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 3px;
}

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

.skill-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  display: flex;
  align-items: center;
  transition: transform 0.15s ease;
}

.skill-list li:hover {
  transform: translateX(5px);
}

.skill-list li::before {
  content: '•';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

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

/* Portfolio Section */
.portfolio-container {
  margin-top: 3rem;
}

.section {
  margin-bottom: 3rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

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

.project-header a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.project-header a:hover {
  color: var(--secondary-color);
}

.project-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-description {
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 2rem 0;
  }
  
  .header h2 {
    font-size: 2rem;
  }
  
  .link-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .project-stats {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .card-header,
  .card-body {
    padding: 1rem;
  }
  
  .project-card {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .header {
    background: none !important;
    color: var(--text-color) !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
    break-inside: avoid;
  }
  
  .link-container a {
    color: var(--text-color) !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #ecf0f1;
    --secondary-color: #3498db;
    --text-color: #ecf0f1;
    --text-muted: #bdc3c7;
    --background-color: #2c3e50;
    --card-background: #34495e;
    --border-color: #4a5d6b;
  }
  
  .header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
  }
}
