@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Dark Theme (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-main: #f3f4f6;
  --text-sub: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #3b82f6;
  --accent-secondary: #6366f1;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-soft: rgba(59, 130, 246, 0.08);
  --accent-gradient: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
  
  --timeline-line: #1f2937;
  --shadow-card: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(11, 15, 25, 0.75);
}

:root.light-mode {
  /* Light Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.75);
  --border: rgba(15, 23, 42, 0.06);
  --border-hover: rgba(15, 23, 42, 0.12);
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  
  --accent: #4f46e5;
  --accent-secondary: #3b82f6;
  --accent-glow: rgba(79, 70, 229, 0.3);
  --accent-soft: rgba(79, 70, 229, 0.06);
  --accent-gradient: linear-gradient(135deg, #4f46e5, #3b82f6, #06b6d4);
  
  --timeline-line: #cbd5e1;
  --shadow-card: rgba(148, 163, 184, 0.08);
  --glass-bg: rgba(248, 250, 252, 0.8);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.5s ease, color 0.3s ease;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  transition: background-color 0.5s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-main);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.logo-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Theme Toggle Button */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

.theme-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.theme-btn .sun-icon {
  display: none;
}

.theme-btn .moon-icon {
  display: block;
}

:root.light-mode .theme-btn .sun-icon {
  display: block;
}

:root.light-mode .theme-btn .moon-icon {
  display: none;
}

/* Layout Grid */
.main-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 350px 1fr;
    align-items: start;
  }
}

/* Sticky Profile Card */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px var(--shadow-card);
  text-align: center;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

@media (min-width: 1024px) {
  .profile-card {
    position: sticky;
    top: 90px;
  }
}

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

.profile-image-container {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gradient);
  position: relative;
}

.profile-image-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-secondary);
  border: 4px solid var(--bg-card);
}

.profile-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.profile-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  min-height: 24px; /* Space for typing animation */
}

.profile-info {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: left;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.info-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.info-item a {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-item a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.download-cv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.download-cv-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.download-cv-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Sections Detail (Right Side) */
.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px var(--shadow-card);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease, transform 0.5s ease, opacity 0.5s ease;
}

/* Fade-in scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  letter-spacing: -0.5px;
}

.section-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.section-title-line {
  flex-grow: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.5rem;
}

.about-text {
  color: var(--text-sub);
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-text p {
  margin-bottom: 1rem;
}

/* Power Platform Highlight Card */
.power-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.power-banner-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.power-banner-title svg {
  color: #3b82f6;
  width: 20px;
  height: 20px;
}

.power-banner-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
}

/* Timeline Layout */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--timeline-line);
}

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

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

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-glow);
  transform: scale(1.2);
}

.timeline-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .timeline-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.timeline-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-subtitle {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.1rem;
}

.timeline-date {
  font-size: 0.85rem;
  background-color: var(--accent-soft);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  align-self: flex-start;
  margin-top: 0.4rem;
}

@media (min-width: 640px) {
  .timeline-date {
    margin-top: 0;
    align-self: auto;
  }
}

.timeline-body {
  color: var(--text-sub);
  font-size: 0.95rem;
}

.timeline-body ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

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

.timeline-body li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.timeline-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.tech-tag {
  font-size: 0.75rem;
  background-color: var(--bg-secondary);
  color: var(--text-sub);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-weight: 500;
}

/* Habilidades / Skills Grid */
.skills-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

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

.skill-node {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.skill-node:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow-card);
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.skill-level-bar {
  width: 100%;
  height: 4px;
  background-color: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.skill-level-fill {
  height: 100%;
  background: var(--accent-gradient);
  width: 0;
  transition: width 1s ease-out;
}

.skill-cat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Projects Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  height: 100%;
}

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

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

.project-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--border);
}

.project-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.project-tag {
  font-size: 0.75rem;
  background-color: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
}

.project-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.2s ease;
}

.project-btn:hover {
  color: var(--accent-secondary);
}

.project-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.project-btn:hover svg {
  transform: translateX(3px);
}

/* Future Project Styling */
.project-card.future {
  border-style: dashed;
  background: transparent;
  opacity: 0.75;
}

.project-card.future:hover {
  opacity: 1;
  border-style: solid;
}

.project-card.future .project-icon-wrapper {
  color: var(--text-muted);
}

/* Footer Section */
footer.global-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background-color: var(--bg-secondary);
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.footer-quote {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

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

/* Languages and Info Panels */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-2col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.info-box-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-box-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.language-item {
  margin-bottom: 0.75rem;
}

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

.lang-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.lang-level {
  color: var(--accent);
  font-weight: 500;
}

.lang-bar {
  height: 6px;
  background-color: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  background: var(--accent-gradient);
  width: 0;
  transition: width 1s ease-out;
}

.data-bullet {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
}

.data-bullet:last-child {
  margin-bottom: 0;
}

.data-bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  border: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.55);
}

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