/* style.css - Premium Stylesheet for Víctor Alonso's Web CV */

/* --- Custom Theme Variables --- */
:root {
  --bg-color: #030712;         /* Deep Space Black */
  --bg-card: rgba(17, 24, 39, 0.65); /* Glassmorphic Dark Charcoal */
  --border-color: rgba(255, 255, 255, 0.06);
  --text-main: #f3f4f6;        /* Bright Gray */
  --text-muted: #9ca3af;       /* Cool Muted Gray */
  --text-label: #6b7280;       /* Darker Label Gray */
  
  --accent-cyan: #06b6d4;      /* Glowing Teal/Cyan */
  --accent-purple: #8b5cf6;    /* Glowing Purple */
  --accent-gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --accent-success: #10b981;   /* Emerald Green */
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Language Visibility Toggles --- */
body.es .lang-en { display: none !important; }
body.en .lang-es { display: none !important; }

/* --- Global Resets & Background --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Decorative Glow Blobs */
.glow-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(80px);
}

.glow-2 {
  position: absolute;
  top: 40%;
  left: -20%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  filter: blur(80px);
}

/* --- Main Header --- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
}

.brand-title h1 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-title .subtitle {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Lang Selector Button Styling */
.lang-selector {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  background-color: rgba(255, 255, 255, 0.02);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  border-radius: 18px;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Action Button */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
  transition: var(--transition);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.3);
}

.action-btn .arrow {
  font-size: 0.7rem;
  transition: var(--transition);
}

/* --- Dropdown Menu Component --- */
.download-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  width: 250px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  padding: 0.5rem 0;
  z-index: 101;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-header {
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.65rem 1.2rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item i {
  color: var(--accent-cyan);
  font-size: 1rem;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.4rem 0;
}

.copy-item i {
  color: var(--accent-purple);
}

.copy-item:hover {
  color: var(--accent-purple);
}

/* Success & Error Dropdown copy states */
.dropdown-item.success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: var(--accent-success) !important;
}
.dropdown-item.success i {
  color: var(--accent-success) !important;
}

.dropdown-item.error {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}
.dropdown-item.error i {
  color: #ef4444 !important;
}

/* --- Layout Grid --- */
.cv-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  gap: 2rem;
  align-items: start;
}

/* --- Sidebar Widgets --- */
.cv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-avatar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.2rem auto;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px dashed var(--accent-cyan);
  animation: spin 30s linear infinite;
  opacity: 0.6;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.profile-role {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.profile-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent-purple);
  padding-left: 0.6rem;
  color: var(--text-main);
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.contact-list li i {
  color: var(--accent-cyan);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

.contact-list li .label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-label);
  text-transform: uppercase;
}

.contact-list li a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  word-break: break-all;
  transition: var(--transition);
}

.contact-list li a:hover {
  color: var(--accent-cyan);
}

/* Language Meters */
.language-bars {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.lang-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

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

.progress-bar {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .progress {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
}

/* --- Main CV Content --- */
.cv-main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cv-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.summary-text {
  font-size: 0.95rem;
  color: var(--text-main);
  text-align: justify;
}

/* --- Skills Matrix --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.2rem;
}

.skill-category-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-pills span {
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* --- Experience Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

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

.timeline-marker {
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 3px solid var(--bg-color);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-marker.education {
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

.timeline-content {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1.4rem;
  transition: var(--transition);
}

.timeline-content:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

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

.role-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.company-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-top: 0.1rem;
}

.badge-freelance {
  font-size: 0.65rem;
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.timeline-bullets {
  list-style: none;
  font-size: 0.85rem;
  padding-left: 0.5rem;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
}

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

.timeline-bullets li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  top: 0;
  color: var(--accent-purple);
  font-size: 1rem;
}

/* --- Projects Showroom --- */
.projects-grid-showroom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.project-show-card {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.project-show-card:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-show-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
}

.project-show-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-show-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-show-meta {
  margin-top: auto;
}

.show-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.show-link:hover {
  text-decoration: underline;
}

.show-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--accent-success);
  font-weight: 600;
}

/* --- Footer --- */
.main-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  background-color: rgba(3, 7, 18, 0.9);
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.main-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: var(--transition);
}

.footer-meta a:hover {
  color: var(--accent-cyan);
}

/* --- Animations --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .cv-layout {
    grid-template-columns: 1fr;
    margin: 1rem auto;
  }
}

@media (max-width: 600px) {
  .main-header {
    padding: 1rem;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .cv-main-content {
    gap: 1.5rem;
  }
  .cv-section {
    padding: 1.5rem;
  }
  .timeline {
    padding-left: 1.2rem;
  }
  .timeline-marker {
    left: -1.55rem;
  }
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline-date {
    margin-top: 0.2rem;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
