/* ============================================================
   JOREL JIMENEZ — Personal CV Site
   Dark theme · Inter + Space Grotesk
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #30363d;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --accent:   #58a6ff;
  --accent-h: #79b8ff;
  --radius:   10px;
  --max-w:    900px;
  --nav-h:    60px;
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-h); }
ul { list-style: none; }
code {
  font-family: 'Fira Code', 'Courier New', monospace;
  background: #21262d;
  color: #79c0ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAV ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
#navbar.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: 1px;
}
.nav-logo:hover { color: var(--accent-h); }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(88, 166, 255, 0.08) 0%, transparent 60%);
}

.hero-content { max-width: 680px; }

.hero-eyebrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

#hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title {
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: var(--accent-h);
  color: #0d1117;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.3);
}
.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---------- SECTIONS ---------- */
section:not(#hero) {
  padding: 96px 0;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Alternating section bg */
#skills, #education { background: var(--surface); }

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 200px;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.highlight-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}
.highlight-label {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

/* ---------- SKILLS ---------- */
.skills-group {
  margin-bottom: 36px;
}
.skills-group:last-child { margin-bottom: 0; }

.skills-group-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  background: #21262d;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}
.timeline-card:hover { border-color: var(--accent); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timeline-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}
.timeline-client {
  color: var(--muted);
  font-weight: 400;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}

/* No bullets on cards with no detail */
.timeline-header:only-child { margin-bottom: 0; }

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-bullets li {
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: 14px;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 3px;
}

/* ---------- EDUCATION & CERTS ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}

.edu-card, .cert-card {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.edu-card h3, .cert-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.edu-degree {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.edu-spec {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.edu-school {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.edu-year {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--muted);
  background: #21262d;
  padding: 3px 10px;
  border-radius: 20px;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cert-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cert-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.cert-name {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}
.cert-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- CONTACT ---------- */
.contact-sub {
  color: var(--muted);
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.contact-item:hover:not(.no-link) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
}
.contact-item.no-link { cursor: default; color: var(--muted); }
.contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-item.no-link svg { color: var(--muted); }

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
  }
  .nav-links a:hover { background: #21262d; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-highlights {
    grid-template-columns: repeat(4, 1fr);
    min-width: unset;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
    gap: 8px;
  }

  section:not(#hero) { padding: 72px 0; }
}

@media (max-width: 480px) {
  .about-highlights { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 200px; text-align: center; }
}
