*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --card-bg: #0f172a;
  --accent: #38bdf8;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617, #020617 40%, #000 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.card {
  max-width: 640px;
  width: 100%;
  background: linear-gradient(145deg, #020617, #020617);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  padding: 2.5rem 2rem;
}

.card h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
}

.card header {
  position: relative;
}

.subtitle {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#cv-summary {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
}

.contact-link {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

.cv-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15);
}

.nav-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.nav-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
}

.nav-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Experience Page Styles */
.experience-card {
  max-width: 900px;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
}

.back-link svg {
  width: 20px;
  height: 20px;
}

.page-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.summary-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.job-card {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
}

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

.company-name {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  color: var(--text);
}

.job-role {
  margin: 0;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
}

.job-dates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}

.date-range {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.duration {
  font-size: 0.85rem;
  color: var(--muted);
}

.project-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-name {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.project-role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.project-dates {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: auto;
}

.achievements {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.achievements li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.95rem;
}

.achievements li strong {
  color: var(--text);
  font-weight: 600;
}

.achievements li:last-child {
  margin-bottom: 0;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.loading,
.error,
.no-data {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

@media (max-width: 640px) {
  .job-header {
    flex-direction: column;
  }
  
  .job-dates {
    align-items: flex-start;
    text-align: left;
  }
  
  .project-dates {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* Projects Page Styles */
.filter-section {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

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

.filter-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.clear-btn {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent);
}

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.skill-filter-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.skill-filter-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.skill-filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.active-filters-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.remove-filter {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.remove-filter:hover {
  opacity: 0.7;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-item {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.project-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
}

.project-item-header {
  margin-bottom: 1rem;
}

.project-title {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: var(--text);
}

.project-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.project-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.project-period {
  font-size: 0.85rem;
  color: var(--muted);
}

.project-summary {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-highlights {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.project-highlights li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-highlights li strong {
  color: var(--text);
  font-weight: 600;
}

.project-highlights li:last-child {
  margin-bottom: 0;
}

.skill-tag.highlighted {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

@media (max-width: 640px) {
  .filter-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Education & Certifications Page Styles */
.edu-section {
  margin-bottom: 3rem;
}

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

.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  color: var(--text);
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
  padding-bottom: 0.5rem;
}

.edu-card {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

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

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

.edu-institution {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: var(--text);
}

.edu-degree {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
}

.edu-location {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.edu-dates {
  white-space: nowrap;
}

.edu-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cert-card {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.cert-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.cert-card.cert-expired {
  opacity: 0.7;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.cert-name {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.3;
}

.cert-status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.cert-status.active {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.cert-status.expired {
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: #fb923c;
}

.cert-issuer {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.cert-year {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.language-card {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}

.language-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.language-name {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--text);
}

.language-level {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 640px) {
  .edu-header {
    flex-direction: column;
  }
  
  .certs-grid,
  .languages-grid {
    grid-template-columns: 1fr;
  }
}
