:root {
  --primary: #e2e8f0;
  --accent: #38bdf8;
  --accent-light: #0c1a2e;
  --text: #cbd5e1;
  --text-light: #94a3b8;
  --border: #1e293b;
  --bg: #0f172a;
  --section-bg: #1a2235;
}

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

body {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: #080c18;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  background: var(--bg);
  border-radius: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Header */
.header {
  background: linear-gradient(135deg, #0f172a 0%, #131c31 50%, #162039 100%);
  color: #fff;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 36px;
  align-items: center;
}

.header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.profile-wrapper {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
  width: fit-content;
}

.profile-pic {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.verified-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  background: #38bdf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #0f172a;
}

.verified-badge svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

.header-info {
  flex: 1;
}

.header h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.header h1 span {
  color: #38bdf8;
  font-weight: 400;
}

.header .subtitle {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 400;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 4px 12px;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.availability-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

.contact-item svg {
  width: 16px;
  height: 16px;
  fill: #38bdf8;
  flex-shrink: 0;
}

.contact-item a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: #fff;
}

/* Main Content */
.main {
  padding: 40px 56px;
}

.section {
  margin-bottom: 36px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Summary */
.summary {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  background: var(--section-bg);
  padding: 20px 24px;
  border-radius: 0;
  border-left: 4px solid var(--accent);
}

/* Experience */
.job {
  margin-bottom: 28px;
  position: relative;
}

.job:last-child {
  margin-bottom: 0;
}

.job::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 48px;
  bottom: -28px;
  width: 2px;
  background: #1e293b;
}

.job:last-child::before {
  display: none;
}

.job-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.company-logo {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(56, 189, 248, 0.5);
  background: #fff;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.company-logo-fallback {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--section-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
}

.job-details {
  flex: 1;
  min-width: 0;
}

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

.job-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
}

.job-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.job-company {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.job ul {
  list-style: none;
  padding: 0;
}

.job ul li {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 6px;
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}

.job ul li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.skill-category {
  background: var(--section-bg);
  padding: 16px 20px;
  border-radius: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.skill-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skill-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-size: 0.8rem;
  color: var(--text);
  background: #0f172a;
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.skill-tag i {
  font-size: 0.9rem;
  color: #f59e0b;
}

.skill-tag .ai-icon {
  width: 14px;
  height: 14px;
  fill: #f59e0b;
}

/* Education */
.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--section-bg);
  border-radius: 0;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  gap: 16px;
}

.edu-icon {
  width: 40px;
  height: 40px;
  background: #0f172a;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-icon svg {
  width: 20px;
  height: 20px;
  fill: #f59e0b;
}

.edu-info {
  flex: 1;
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-degree {
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.edu-school {
  font-size: 0.85rem;
  color: var(--text-light);
}

.edu-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* Open Source */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.oss-card {
  background: var(--section-bg);
  padding: 18px 20px;
  border-radius: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.oss-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.oss-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
}

.oss-card-title a {
  color: var(--accent);
  text-decoration: none;
}

.oss-card-title a:hover {
  text-decoration: underline;
}

.oss-card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.oss-card ul {
  list-style: none;
  padding: 0;
}

.oss-card ul li {
  font-size: 0.8rem;
  color: var(--text);
  padding-left: 14px;
  position: relative;
  margin-bottom: 3px;
}

.oss-card ul li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
  margin-left: 8px;
}

.stars svg {
  width: 12px;
  height: 12px;
  fill: #f59e0b;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--section-bg);
  margin-bottom: 36px;
  border: 1px solid var(--border);
}

.stat-item {
  text-align: center;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: 'Raleway', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 600;
}

/* Key Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.achievement-card {
  background: var(--section-bg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.achievement-icon {
  width: 40px;
  height: 40px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.achievement-icon svg {
  width: 20px;
  height: 20px;
  fill: #f59e0b;
}

.achievement-text {
  flex: 1;
}

.achievement-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.achievement-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.stat-number .counter {
  display: inline;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(56, 189, 248, 0.15); }
}

.profile-wrapper {
  animation: pulse-glow 3s ease-in-out infinite;
  border-radius: 50%;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.achievement-icon {
  animation: float 3s ease-in-out infinite;
}

.achievement-card:nth-child(2) .achievement-icon { animation-delay: 0.5s; }
.achievement-card:nth-child(3) .achievement-icon { animation-delay: 1s; }
.achievement-card:nth-child(4) .achievement-icon { animation-delay: 1.5s; }
.achievement-card:nth-child(5) .achievement-icon { animation-delay: 2s; }
.achievement-card:nth-child(6) .achievement-icon { animation-delay: 2.5s; }

/* Job Tech Tags */
.job-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.job-tech-tag {
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 2px 8px;
  font-weight: 600;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.testimonial-card {
  background: var(--section-bg);
  padding: 24px;
  border: 1px solid var(--border);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: 8px;
  left: 16px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 14px;
  padding-top: 8px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-author-info {
  flex: 1;
}

.testimonial-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* Languages */
.lang-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-item {
  background: var(--section-bg);
  padding: 14px 22px;
  border-radius: 0;
  border: 1px solid var(--border);
  text-align: center;
  min-width: 140px;
}

.lang-flag {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 6px;
}

.lang-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.lang-level {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Footer */
.footer {
  text-align: center;
  padding: 36px 56px;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: #38bdf8;
  color: #0f172a;
}

.btn-primary svg {
  fill: #0f172a;
}

.btn-primary:hover {
  background: #7dd3fc;
}

.btn-outline {
  background: transparent;
  color: #38bdf8;
  border: 2px solid #38bdf8;
}

.btn-outline svg {
  fill: #38bdf8;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
}

/* Print */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  body {
    background: #080c18;
  }
  .container {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .header {
    padding: 32px 40px;
  }
  .main {
    padding: 28px 40px;
  }
  .skill-category:hover,
  .oss-card:hover,
  .achievement-card:hover {
    transform: none;
    box-shadow: none;
  }
  .fade-in, .slide-in-left {
    opacity: 1 !important;
    transform: none !important;
  }
  .profile-wrapper {
    animation: none !important;
  }
  .achievement-icon {
    animation: none !important;
  }
  .footer {
    display: none;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    margin: 0;
    border-radius: 0;
  }
  .header, .main {
    padding: 28px 24px;
  }
  .header {
    flex-direction: column;
    text-align: center;
  }
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  .contact-row {
    justify-content: center;
  }
  .header h1 {
    font-size: 1.8rem;
  }
  .contact-row {
    gap: 12px;
  }
  .job-header {
    flex-direction: column;
  }
  .edu-item {
    flex-direction: column;
    gap: 4px;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    border-top: 1px solid var(--border);
  }
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .oss-grid {
    grid-template-columns: 1fr;
  }
}
