/* ==========================================================
   Juan Victor González – Portfolio/CV
   Dark tech theme · ServiceNow-inspired
   ========================================================== */

/* ===== Variables ===== */
:root {
  --bg:            #0d1117;
  --surface:       #161b22;
  --surface-2:     #21262d;
  --border:        rgba(255, 255, 255, 0.07);
  --accent:        #818cf8;
  --accent-dark:   #6366f1;
  --accent-glow:   rgba(99, 102, 241, 0.22);
  --text:          #e6edf3;
  --text-muted:    #8b949e;
  --text-faint:    #484f58;
  --sidebar-w:     260px;
  --radius:        12px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }
p { margin-bottom: 0.85rem; }
p:last-child { margin-bottom: 0; }

/* ===== Sidebar ===== */
#sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s var(--ease);
}

/* --- Profile header --- */
.sidebar-header { text-align: center; margin-bottom: 2rem; }

.profile-img-wrap {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.9rem;
  border: 3px solid var(--accent-dark);
  box-shadow: 0 0 24px var(--accent-glow);
}
.profile-img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}
.sidebar-title {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}
.sidebar-location {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.sidebar-location i { margin-right: 0.3rem; color: var(--accent); }

/* --- Nav links --- */
.nav-links { list-style: none; flex: 1; padding: 0.25rem 0; }
.nav-links li { margin-bottom: 0.15rem; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link i { width: 15px; text-align: center; flex-shrink: 0; }
.nav-link:hover,
.nav-link.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

/* --- Social icons --- */
.sidebar-social {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.social-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: all 0.2s var(--ease);
}
.social-icon:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

/* --- Mobile menu button --- */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 200;
  background: var(--accent-dark);
  border: none;
  border-radius: 8px;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.25s var(--ease);
}

/* Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ===== Main content ===== */
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

/* ===== Sections ===== */
.section {
  padding: 4.5rem 3.5rem;
  border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }
.section-inner { max-width: 820px; }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.accent-line {
  display: block;
  width: 4px;
  height: 1.65rem;
  background: linear-gradient(180deg, var(--accent-dark), var(--accent));
  border-radius: 4px;
  flex-shrink: 0;
}

/* ===== About ===== */
#about { padding-top: 5rem; }

.name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.accent { color: var(--accent); }
.title-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.25rem;
}
.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: 0.845rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.contact-bar i { margin-right: 0.35rem; color: var(--accent); }
.contact-bar a { color: var(--text-muted); }
.contact-bar a:hover { color: var(--accent); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
}
.about-text .lead {
  font-size: 1.025rem;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.about-text p { color: var(--text-muted); }
.about-text strong { color: var(--text); font-weight: 600; }

.top-skills-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  align-self: start;
}
.box-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}

/* ===== Tags ===== */
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-dark) 0%, transparent 100%);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}
.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 10px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 2px solid var(--bg);
  box-shadow: 0 0 10px var(--accent-glow);
  margin-left: 1px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.timeline-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.tl-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.2rem;
}
.company-name {
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 500;
}
.loc-text { color: var(--text-muted); font-weight: 400; }

.date-badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 0.22rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.timeline-card > p { font-size: 0.875rem; color: var(--text-muted); }

/* Sub-roles (Indra) */
.sub-roles {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}
.sub-role {
  background: var(--surface-2);
  border-left: 3px solid var(--accent-dark);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1rem;
}
.sub-role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.sub-role-header strong { font-size: 0.875rem; color: var(--text); font-weight: 600; }
.date-small { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.sub-role p { font-size: 0.845rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Chips */
.tech-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.chip {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  background: rgba(129, 140, 248, 0.07);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ===== Education & Certifications ===== */
.edu-cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.col-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.col-label i { color: var(--accent); }

/* Education card */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.edu-card-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.edu-institution { font-size: 0.86rem; color: var(--accent); margin-bottom: 0.2rem; font-weight: 500; }
.edu-field { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.edu-highlights { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Cert list */
.cert-list { display: flex; flex-direction: column; gap: 0.65rem; }
.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s var(--ease);
}
.cert-item:hover { border-color: rgba(99, 102, 241, 0.4); }
.cert-item.featured { border-color: rgba(99, 102, 241, 0.3); background: rgba(99,102,241,0.04); }

.cert-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.cert-icon img { width: 22px; }
.lang-icon { font-size: 1.1rem; }

.cert-name {
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cert-org { font-size: 0.76rem; color: var(--text-muted); }
.cert-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-dark);
  color: #fff;
  letter-spacing: 0.03em;
}

/* ===== Skills ===== */
.skills-grid { display: flex; flex-direction: column; gap: 2rem; }

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 80px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.skill-icon-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.skill-icon-item img { width: 40px; height: 40px; object-fit: contain; }
.skill-icon-item span { font-size: 0.7rem; color: var(--text-muted); text-align: center; }

/* ===== Interests ===== */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.interest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.interest-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-2px);
}
.interest-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.interest-card h4 { font-size: 0.93rem; font-weight: 600; color: #fff; margin-bottom: 0.45rem; }
.interest-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* Artistic row */
.artistic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.artistic-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
}
.artistic-item i { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .section { padding: 4rem 2.5rem; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .edu-cert-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #main-content {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex;
  }
  .section {
    padding: 3rem 1.25rem;
  }
  #about { padding-top: 4.5rem; }
  .timeline { padding-left: 1rem; }
  .tl-header { flex-direction: column; gap: 0.4rem; }
  .sub-role-header { flex-direction: column; gap: 0.2rem; }
  .interests-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .interests-grid { grid-template-columns: 1fr; }
  .contact-bar { flex-direction: column; gap: 0.35rem; }
  .edu-card-header { flex-direction: column; gap: 0.4rem; }
}
