/* Custom Design System for Jone Polvora Portfolio */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-card: rgba(22, 30, 49, 0.6);
  --bg-card-hover: rgba(28, 38, 62, 0.8);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-purple: #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --success: #10b981;
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(99, 102, 241, 0.35);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 12px 40px rgba(99, 102, 241, 0.12);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

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

/* Header / Hero */
header {
  padding: 5rem 0 3rem 0;
  position: relative;
}

.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
}

.avatar-container {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
  object-fit: cover;
}

.status-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--success);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 2px solid var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.profile-info {
  flex-grow: 1;
}

.profile-name {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-title {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.profile-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* Stats Section */
.stats-section {
  margin-bottom: 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.stat-num {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Languages distribution styling */
.languages-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.languages-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.languages-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
}

.lang-segment {
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.languages-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-percent {
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

/* Portfolio Content */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.portfolio-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  position: relative;
}

.portfolio-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.search-filter-box {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
  background: var(--bg-card-hover);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Filters */
.filters-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-badge.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  position: relative;
}

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

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

.project-repo-name {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
  word-break: break-all;
}

.project-repo-name:hover {
  color: var(--accent-light);
}

.project-star {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-star svg {
  width: 14px;
  height: 14px;
  fill: #eab308;
  color: #eab308;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
  line-height: 1.5;
}

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

.project-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.project-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.project-link svg {
  width: 16px;
  height: 16px;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Footer */
footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.9);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--accent-light);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-update-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Profile Navigation Menu (Pills) */
.profile-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.nav-pill {
  padding: 0.6rem 1.25rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-pill:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.nav-pill svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Sections Layout */
.section-container {
  margin-top: 5rem;
  padding-top: 5rem;
  border-top: 1px solid var(--border-color);
  scroll-margin-top: 2rem; /* ensures navigation scroll leaves room */
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Certifications Grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: var(--transition-smooth);
  box-shadow: var(--card-shadow);
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-hover);
  box-shadow: var(--card-shadow-hover);
}

.cert-icon {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  border-radius: 10px;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-icon svg {
  width: 20px;
  height: 20px;
}

.cert-info {
  flex-grow: 1;
}

.cert-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 500;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Blog & Posts Grid Layout */
.posts-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.blog-banner-container {
  display: flex;
  flex-direction: column;
}

.blog-highlight-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: var(--transition-smooth);
}

.blog-highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.18);
}

.blog-tag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--accent-purple);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-name {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Post list reset and style */
.posts-list-container {
  display: flex;
  flex-direction: column;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.post-list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.post-item-link {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.post-item-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateX(6px);
  box-shadow: var(--card-shadow-hover);
}

.post-icon {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
  border-radius: 10px;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-icon svg {
  width: 18px;
  height: 18px;
}

.post-info {
  flex-grow: 1;
}

.post-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
}

.post-type {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 900px) {
  .posts-layout-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  
  .profile-links {
    justify-content: center;
  }
  
  .portfolio-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filter-box {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .profile-name {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Language Selector */
.lang-selector {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lang-btn {
  min-width: 2.25rem;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition-smooth, all 0.2s ease);
}

.lang-btn:hover {
  color: var(--text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.06);
}

.lang-btn.active {
  color: #fff;
  background: var(--accent-gradient, linear-gradient(135deg, #6366f1 0%, #a855f7 100%));
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

@media (max-width: 768px) {
  .lang-selector {
    top: 0.75rem;
    right: 0.75rem;
  }

  .lang-btn {
    min-width: 2rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
}

/* Floating Scroll-to-Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
}

@media (max-width: 768px) {
  .scroll-to-top-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}
