/*
Theme Name: Diego Balarezo Portfolio
Theme URI: https://diegobalarezo.com/
Author: Diego Balarezo
Description: Portfolio theme for Diego Balarezo — Technical Animator. Dark theme with smooth scroll animations, gradient accents, and card hover effects. Fully compatible with Elementor.
Version: 4.0.0
License: Private
Text Domain: diegobalarezo
*/

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

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --background:    #0e0e10;
  --foreground:    #eaeaea;
  --card:          #17171a;
  --primary:       #7a1c2e;
  --primary-hover: #a0304a;
  --primary-fg:    #ffffff;
  --secondary:     #202025;
  --muted:         #2a2a30;
  --muted-fg:      #999999;
  --border:        #2a2a30;
  --radius:        0.75rem;
  --font-display:  'Plus Jakarta Sans', sans-serif;
  --font-body:     'Inter', sans-serif;
  --gradient-accent: linear-gradient(135deg, #7a1c2e, #a0304a);
  --shadow-glow:   0 0 40px rgba(122,28,46,0.15);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.3);
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.1; color: var(--foreground); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul,ol { list-style: none; }

/* ─────────────────────────────────────────────
   SCROLL ANIMATIONS (IntersectionObserver)
───────────────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────
   HERO CSS ANIMATIONS (no JS needed)
───────────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim-1 { animation: heroFadeUp 0.5s ease forwards; }
.hero-anim-2 { animation: heroFadeUp 0.7s ease 0.1s both; }
.hero-anim-3 { animation: heroFadeUp 0.7s ease 0.25s both; }
.hero-anim-4 { animation: heroFadeUp 0.7s ease 0.4s both; }

/* ─────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}
.btn-outline:hover { background: var(--card); }

.section-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ─────────────────────────────────────────────
   CARD
───────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(122,28,46,0.5);
}

/* ─────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(14,14,16,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a.active { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 4px;
}
.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--background);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  display: none;
}
.mobile-nav.open { display: block; max-height: 300px; opacity: 1; }
.mobile-nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .site-nav  { display: none; }
  .nav-toggle { display: block; }
}

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    linear-gradient(hsl(0 0% 100%) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100%) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: 25%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(122,28,46,0.05);
  filter: blur(120px);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(0.9); }
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero-description {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
  color: var(--muted-fg);
  line-height: 1.75;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ─────────────────────────────────────────────
   SHOWREEL
───────────────────────────────────────────── */
.showreel-section { padding: 3rem 0 4rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.video-wrapper { max-width: 56rem; margin: 0 auto; }
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.video-container iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ─────────────────────────────────────────────
   PORTFOLIO GRID
───────────────────────────────────────────── */
.portfolio-section { padding: 4rem 0; }
.portfolio-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.view-all-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--primary);
  transition: color 0.2s;
}
.view-all-link:hover { color: var(--primary-hover); }
.view-all-link svg { transition: transform 0.2s; }
.view-all-link:hover svg { transform: translateX(4px); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .projects-grid { grid-template-columns: 1fr; } }

/* Center last item if grid row is incomplete */
.projects-grid > *:last-child:nth-child(3n-1) {
  grid-column: 2 / 3;
}
.projects-grid > *:last-child:nth-child(3n-2):not(:nth-child(1)) {
  grid-column: 1 / 3;
}

.project-card {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(122,28,46,0.5);
}
.project-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: var(--secondary);
}
.project-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.project-card:hover .project-thumb img { opacity: 0.85; transform: scale(1.05); }
.project-thumb-icon {
  position: absolute; top: 1rem; right: 1rem;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: rgba(14,14,16,0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-thumb-icon { opacity: 1; }
.project-info { padding: 1.25rem; }
.project-meta {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; margin-bottom: 0.5rem;
}
.project-engine {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.625rem; font-weight: 500; color: var(--primary);
}
.project-role { font-size: 0.625rem; color: var(--muted-fg); }
.project-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.project-desc {
  font-size: 0.75rem; color: var(--muted-fg);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 1rem; }
.tag {
  padding: 0.125rem 0.5rem; border-radius: 999px;
  background: rgba(122,28,46,0.1); color: var(--primary);
  font-size: 0.625rem; font-weight: 500;
}
.tag-more {
  padding: 0.125rem 0.5rem; border-radius: 999px;
  background: var(--secondary); color: var(--muted-fg);
  font-size: 0.625rem; font-weight: 500;
}

/* ─────────────────────────────────────────────
   EXPERTISE
───────────────────────────────────────────── */
.expertise-section { padding: 4rem 0; border-top: 1px solid var(--border); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 480px)  { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .skills-grid { grid-template-columns: repeat(4, 1fr); } }

.skill-card {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 0.75rem;
  background: var(--card); border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(122,28,46,0.5);
}
.skill-icon { width: 2rem; height: 2rem; color: var(--primary); margin-bottom: 0.75rem; }
.skill-label { font-size: 0.875rem; font-weight: 500; line-height: 1.3; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}
.footer-inner {
  display: flex; flex-direction: column; gap: 3rem;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: center; gap: 8rem; }
}
.footer-brand-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem;
}
.footer-brand-desc {
  font-size: 0.875rem; color: var(--muted-fg);
  max-width: 22rem; margin-bottom: 1.5rem;
}
.social-links { display: flex; gap: 0.75rem; }
.social-link {
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-fg);
  transition: color 0.2s, border-color 0.2s;
}
.social-link:hover { color: var(--primary); border-color: rgba(122,28,46,0.3); }
.footer-nav-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 1rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { font-size: 0.875rem; color: var(--muted-fg); transition: color 0.2s; }
.footer-nav a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 0.75rem; color: var(--muted-fg);
}

/* ─────────────────────────────────────────────
   PAGE SECTIONS
───────────────────────────────────────────── */
.page-section { padding-top: 8rem; padding-bottom: 6rem; }
.page-max { max-width: 48rem; margin: 0 auto; }
.page-max-center { max-width: 48rem; margin: 0 auto; text-align: center; }
.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800; margin-bottom: 2rem;
}
.prose p {
  font-size: 1.125rem; color: var(--muted-fg);
  line-height: 1.75; margin-bottom: 1.25rem;
}
.highlights-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .highlights-grid { grid-template-columns: 1fr 1fr; } }

.highlight-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem; border-radius: 0.75rem;
  background: var(--card); border: 1px solid var(--border);
}
.highlight-item span { font-size: 0.875rem; font-weight: 500; }

.connect-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 1rem; }
.connect-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.connect-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 500; color: var(--muted-fg);
  transition: color 0.2s, border-color 0.2s;
}
.connect-link:hover { color: var(--primary); border-color: rgba(122,28,46,0.3); }

/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
.contact-list { display: flex; flex-direction: column; gap: 1rem; max-width: 24rem; margin: 0 auto; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; border-radius: 0.75rem;
  background: var(--card); border: 1px solid var(--border);
  color: var(--foreground); text-decoration: none;
  transition: border-color 0.2s;
}
.contact-item:hover { border-color: rgba(122,28,46,0.3); }
.contact-icon-wrap {
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  background: rgba(122,28,46,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
}
.contact-item:hover .contact-icon-wrap { background: rgba(122,28,46,0.2); }
.contact-label { font-weight: 500; }
.contact-desc  { font-size: 0.875rem; color: var(--muted-fg); }

/* ─────────────────────────────────────────────
   COMMUNITY
───────────────────────────────────────────── */
.community-topics {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
  max-width: 56rem; margin: 0 auto;
}
@media (min-width: 640px)  { .community-topics { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .community-topics { grid-template-columns: 1fr 1fr 1fr; } }

.topic-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; border-radius: 0.75rem;
  background: var(--card); border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.2s;
}
.topic-item:hover { transform: translateY(-2px); border-color: rgba(122,28,46,0.3); }
.topic-icon-wrap {
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  background: rgba(122,28,46,0.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topic-label { font-weight: 500; }

/* ─────────────────────────────────────────────
   PORTFOLIO ARCHIVE (2 cols)
───────────────────────────────────────────── */
.portfolio-archive-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
@media (min-width: 768px) { .portfolio-archive-grid { grid-template-columns: 1fr 1fr; } }

/* ─────────────────────────────────────────────
   PROJECT DETAIL
───────────────────────────────────────────── */
.project-detail-max { max-width: 64rem; margin: 0 auto; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted-fg);
  transition: color 0.2s; margin-bottom: 2.5rem; text-decoration: none;
}
.back-link:hover { color: var(--primary); }
.project-summary-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; padding: 2rem; margin-bottom: 3rem;
}
.project-summary-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 1.5rem;
}
.project-meta-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem; font-size: 0.875rem; margin-bottom: 2rem;
}
@media (min-width: 640px)  { .project-meta-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .project-meta-grid { grid-template-columns: repeat(5, 1fr); } }

.meta-label {
  font-size: 0.625rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted-fg); margin-bottom: 0.25rem;
}
.meta-value { font-weight: 500; color: var(--foreground); }
.detail-section { margin-bottom: 4rem; }
.detail-section-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.detail-section-title svg { color: var(--primary); }
.checklist { display: flex; flex-direction: column; gap: 0.75rem; }
.checklist li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--muted-fg); }
.checklist li svg { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.detail-two-col { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .detail-two-col { grid-template-columns: 1fr 1fr; } }
.enemy-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.enemy-tag {
  padding: 0.5rem 1rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: var(--secondary);
  font-size: 0.875rem; font-weight: 500;
}

/* ─────────────────────────────────────────────
   ELEMENTOR COMPAT
───────────────────────────────────────────── */
.elementor-page { background-color: var(--background) !important; }
.elementor-section, .elementor-widget-wrap { background: transparent; }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title    { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .page-title    { font-size: 2.5rem; }
}
