/* ============================================================
   Jason Martinez — Resume Website  |  Custom Styles
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Saira+Extra+Condensed:wght@500;700;900&family=Muli:wght@300;400;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --sidebar-width: 270px;
  --primary:      #1d4ed8;   /* blue-700 */
  --primary-dark: #1e3a8a;   /* blue-900 */
  --primary-light:#3b82f6;   /* blue-500 */
  --accent:       #60a5fa;   /* blue-400 */
  --bg-sidebar:   #0f172a;   /* slate-950 */
  --bg-body:      #f1f5f9;
  --text-light:   #cbd5e1;
  --text-muted-sidebar: #64748b;
  --section-bg:   #ffffff;
  --border-color: #dde3ed;
  --shadow-sm:    none;
  --shadow-md:    none;
  --radius:       4px;
  --transition:   all 0.3s ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Muli', sans-serif;
  background: var(--bg-body);
  color: #2d3748;
  margin: 0;
  padding-left: var(--sidebar-width);
  overflow-x: hidden;
}

/* ---------- Sidebar ---------- */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1000;
  border-right: 1px solid rgba(255,255,255,.07);
}

/* Profile block */
.sidebar-profile {
  padding: 2rem 1.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.profile-img-wrapper {
  display: inline-block;
  padding: 4px;
  background: var(--primary);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.profile-img {
  width: 110px;
  height: 110px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg-sidebar);
}

.sidebar-profile h1 {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #ffffff;
  margin: 0 0 .25rem;
}

.sidebar-profile .tagline {
  font-size: .78rem;
  color: var(--text-muted-sidebar);
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* Nav */
#sidebar-nav {
  flex: 1;
  padding: 1.25rem 0;
}

#sidebar-nav .nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted-sidebar);
  padding: .5rem 1.75rem .25rem;
  margin-top: .5rem;
}

#sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.75rem;
  color: var(--text-light);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  transition: var(--transition);
  cursor: pointer;
}

#sidebar-nav .nav-link i {
  width: 18px;
  text-align: center;
  font-size: .9rem;
  color: var(--primary-light);
  transition: var(--transition);
}

#sidebar-nav .nav-link:hover,
#sidebar-nav .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.05);
  border-left-color: var(--accent);
}

#sidebar-nav .nav-link:hover i,
#sidebar-nav .nav-link.active i {
  color: var(--accent);
}

/* Sidebar social */
.sidebar-social {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: center;
  gap: .9rem;
}

.sidebar-social a {
  color: var(--text-muted-sidebar);
  font-size: 1rem;
  transition: var(--transition);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
}

.sidebar-social a:hover {
  color: var(--accent);
  background: rgba(96,165,250,.15);
}

/* ---------- Main Content ---------- */
main {
  min-height: 100vh;
}

/* ---------- Hero / About ---------- */
#about {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 6rem 5rem 5rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#about::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  right: -150px;
  top: -150px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  pointer-events: none;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(4px);
}

#about h2 {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 .5rem;
  line-height: 1.1;
}

#about .subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 1.5rem;
}

.about-contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.75rem;
}

.about-contact-chips a,
.about-contact-chips span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  padding: .35rem .9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.about-contact-chips a:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

#about p.bio {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,.88);
  max-width: 720px;
}

/* ---------- Back to top ---------- */
.back-to-top-wrap {
  background: rgba(255,255,255,.1);
  border-top: 1px solid rgba(255,255,255,.15);
  padding: .6rem 1.75rem;
  text-align: center;
}

.back-to-top-wrap a {
  font-size: .75rem;
  color: var(--text-muted-sidebar);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: var(--transition);
}

.back-to-top-wrap a:hover { color: var(--accent); }

/* ---------- Content Sections ---------- */
section:not(#about) {
  padding: 5rem 5rem 4rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--section-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* ensure anchor links land below mobile hamburger */
  scroll-margin-top: 0;
}

/* scroll offset for all sections */
section {
  scroll-margin-top: 0;
}

/* Alternating backgrounds — explicit so restructuring doesn't break them */
#experience, #projects, #interests {
  background: var(--section-bg);
}

#education, #skills, #resume-pdf {
  background: var(--bg-body);
}

/* PDF section: no min-height, start from top */
#resume-pdf {
  min-height: auto;
  justify-content: flex-start;
}

/* Section heading */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-heading .heading-icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;

}

.section-heading h2 {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1a2e35;
  margin: 0;
  position: relative;
}

.section-heading h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin-top: .35rem;
  transition: width .35s ease;
}

.section-heading:hover h2::after { width: 80px; }

/* ---------- Timeline (Experience & Education) ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary-dark));
  border-radius: 2px;
}

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

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

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: .4rem;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--primary);
  border: 3px solid var(--section-bg);
  z-index: 1;
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--primary);
}

/* timeline dot border matches section bg */
#experience .timeline-dot, #projects .timeline-dot, #interests .timeline-dot {
  border-color: var(--section-bg);
}

#education .timeline-dot, #skills .timeline-dot {
  border-color: var(--bg-body);
}

/* timeline card bg matches section */
#education .timeline-card, #skills .timeline-card {
  background: var(--section-bg);
}

.timeline-card .tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.tc-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2e35;
  margin: 0;
}

.tc-header .badge-pill {
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 4px;
  background: rgba(29,78,216,.1);
  color: var(--primary);
  white-space: nowrap;
}

.tc-org {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .5rem;
}

.tc-desc {
  font-size: .88rem;
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

.tc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .85rem;
}

.tc-tags .tag {
  font-size: .72rem;
  padding: .2rem .6rem;
  border-radius: 2px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: #4a5568;
}

/* ---------- Skills ---------- */
.skills-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.skill-group-label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border-color);
}

.skill-tags {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.skill-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  aspect-ratio: 1;
  padding: 1rem .5rem;
  background: var(--bg-body);
  color: #2d3748;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: var(--transition);
  cursor: default;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.skill-tag i {
  font-size: 1.75rem;
  line-height: 1;
}

.skill-tag span {
  line-height: 1.2;
}

.skill-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- Interests ---------- */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.interest-card {
  background: var(--section-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.interest-card:hover {
  border-color: var(--primary);
}

.interest-card .int-icon {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .85rem;
  color: #fff;
  font-size: 1.2rem;
}

.interest-card h4 {
  font-size: .9rem;
  font-weight: 700;
  color: #1a2e35;
  margin: 0 0 .4rem;
}

.interest-card p {
  font-size: .78rem;
  color: #718096;
  margin: 0;
  line-height: 1.55;
}

/* ---------- Awards ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.award-card {
  background: var(--section-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  transition: var(--transition);
}

.award-card:hover {
  border-color: var(--primary);
}

.award-icon {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary-light), #93c5fd);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.award-card h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #1a2e35;
  margin: 0 0 .25rem;
}

.award-card p {
  font-size: .82rem;
  color: #718096;
  margin: 0;
  line-height: 1.5;
}

.award-card .award-year {
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: .4rem;
  display: inline-block;
}

/* ---------- PDF Resume Section ---------- */
.pdf-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: .7rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid var(--primary);
  transition: var(--transition);
  align-self: flex-start;
}

.pdf-download-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.pdf-embed-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  background: #525659;
}

.pdf-embed {
  display: block;
  width: 100%;
  height: 85vh;
  border: none;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-sidebar);
  color: var(--text-muted-sidebar);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .82rem;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
}

/* ---------- Mobile Navbar ---------- */
#mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1100;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: var(--bg-sidebar);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Scrollbar ---------- */
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { padding-left: 0; }

  #sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
  }

  #sidebar.open { transform: translateX(0); }

  #mobile-nav-toggle { display: flex; }

  /* sections get comfortable mobile padding, no min-height lock */
  #about {
    padding: 4rem 1.75rem 3rem;
    min-height: auto;
    justify-content: flex-start;
  }

  section:not(#about) {
    padding: 3rem 1.5rem 2.5rem;
    min-height: auto;
    justify-content: flex-start;
  }

  /* skills: 2 groups per row on tablet */
  .skills-tag-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* awards 1 col on tablet */
  .awards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  /* section headings */
  .section-heading h2 { font-size: 1.5rem; }
  .section-heading .heading-icon { width: 40px; height: 40px; font-size: 1rem; }
  .section-heading { gap: .75rem; margin-bottom: 1.75rem; }

  /* about chips wrap tightly */
  .about-contact-chips a,
  .about-contact-chips span { font-size: .75rem; padding: .3rem .7rem; }

  /* skills: 1 group per row, skill-tags stay 3-col (cards are small but OK) */
  .skills-tag-grid { grid-template-columns: 1fr; }
  .skill-tags { grid-template-columns: repeat(3, 1fr); }

  /* interests 2 cols */
  .interests-grid { grid-template-columns: repeat(2, 1fr); }

  /* pdf embed shorter on mobile */
  .pdf-embed { height: 60vh; }

  /* timeline tighter */
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.5rem; }
}
