/* =============================================
   DESIGN SYSTEM — hazelsaenz.tech aesthetic
   CSS Variables · BEM · Flexbox/Grid · Responsive
   ============================================= */
:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2128;
  --surface:   #21262d;
  --border:    rgba(255,255,255,0.08);
  --text:      #c9d1d9;
  --muted:     #8b949e;
  --heading:   #f0f6fc;
  --a1:        #58a6ff;
  --a2:        #bc8cff;
  --a3:        #f78166;
  --grad:      linear-gradient(135deg, var(--a1), var(--a2));
  --grad-hero: linear-gradient(135deg, #0d1117 0%, #161b22 55%, #1a1035 100%);
  --grad-btn:  linear-gradient(135deg, var(--a1) 0%, var(--a2) 100%);
  --sidebar-w: 275px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow: 0 4px 28px rgba(0,0,0,0.5);
  --t:     0.25s ease;
  --font:  'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── Layout ─────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 100; overflow-y: auto;
  transition: transform var(--t);
}
.main { margin-left: var(--sidebar-w); }

/* ── Sidebar top ────────────────────────────── */
.sidebar__top {
  padding: 2.25rem 1.5rem 1.75rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.sidebar__avatar {
  width: 92px; height: 92px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--grad); padding: 2px; margin-bottom: 1.1rem;
}
.sidebar__avatar img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }
.sidebar__name {
  font-size: 1rem; font-weight: 700;
  color: var(--heading); line-height: 1.3; margin-bottom: 0.3rem;
}
.sidebar__role {
  font-size: 0.8rem; font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.2rem;
}
.sidebar__sub { font-size: 0.72rem; color: var(--muted); margin-bottom: 1.75rem; }

/* ── Nav ────────────────────────────────────── */
.sidebar__nav { width: 100%; }
.sidebar__nav ul { display: flex; flex-direction: column; gap: 2px; }
.sidebar__nav .nav-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 1rem; border-radius: var(--r-sm);
  font-size: 0.85rem; font-weight: 500; color: var(--muted);
  transition: all var(--t); border-left: 2px solid transparent;
}
.sidebar__nav .nav-link i { width: 15px; text-align: center; font-size: 0.78rem; flex-shrink: 0; }
.sidebar__nav .nav-link:hover,
.sidebar__nav .nav-link.active {
  background: rgba(88,166,255,0.1); color: var(--a1); border-left-color: var(--a1);
}

/* ── Sidebar bottom ─────────────────────────── */
.sidebar__bottom { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.social-icons { display: flex; justify-content: center; gap: 0.6rem; }
.social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  font-size: 0.82rem; border: 1px solid var(--border); transition: all var(--t);
}
.social-icons a:hover {
  background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-2px);
}

/* ── Mobile toggle ──────────────────────────── */
.nav-toggle {
  display: none; position: fixed; top: 0.85rem; left: 0.85rem; z-index: 200;
  width: 40px; height: 40px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--r-sm);
  font-size: 0.95rem; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 99;
  opacity: 0; transition: opacity var(--t);
}
.nav-overlay.is-visible { opacity: 1; }

/* ── Sections ───────────────────────────────── */
.section        { padding: 5rem 0; }
.section__inner { max-width: 920px; margin: 0 auto; padding: 0 2.5rem; }
.section--light { background: var(--bg2); }
.section--dark  { background: var(--bg3); }
.section__header { text-align: center; margin-bottom: 2.75rem; }
.section__title {
  font-size: 1.65rem; font-weight: 700; color: var(--heading); margin-bottom: 0.65rem;
}
.section__title i {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; margin-right: 0.45rem;
}
.section__title::after {
  content: ''; display: block; width: 38px; height: 2px;
  background: var(--grad); border-radius: 2px; margin: 0.55rem auto 0;
}
.section__desc { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 0.93rem; line-height: 1.8; }

/* ── Hero ───────────────────────────────────── */
.section--hero {
  background: var(--grad-hero); min-height: 100vh;
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.section--hero::before {
  content: ''; position: absolute;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(88,166,255,0.07) 0%, transparent 70%);
  top: -140px; right: -120px; pointer-events: none;
}
.section--hero::after {
  content: ''; position: absolute;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(188,140,255,0.05) 0%, transparent 70%);
  bottom: -80px; left: -40px; pointer-events: none;
}
.hero__badge {
  display: inline-block; padding: 0.32rem 0.95rem;
  background: rgba(88,166,255,0.12); color: var(--a1);
  border: 1px solid rgba(88,166,255,0.25); border-radius: 100px;
  font-size: 0.73rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(1.9rem, 3.5vw, 3rem); font-weight: 800;
  color: var(--heading); line-height: 1.18; margin-bottom: 1.1rem;
}
.gradient-text {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle { font-size: 1rem; color: var(--muted); max-width: 530px; margin-bottom: 1.9rem; line-height: 1.8; }
.hero__actions  { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.hero__tags     { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  padding: 0.28rem 0.78rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px;
  font-size: 0.75rem; color: var(--muted);
}

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.6rem; border-radius: var(--r-sm);
  font-size: 0.88rem; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer; transition: all var(--t);
}
.btn--primary {
  background: var(--grad-btn); color: #fff;
  box-shadow: 0 3px 14px rgba(88,166,255,0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(88,166,255,0.45); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface); border-color: var(--a1); color: var(--a1); }

/* ── Project cards ──────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.project-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; transition: all var(--t);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(88,166,255,0.3); }
.project-card__img-wrap { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; }
.project-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-card__img-wrap img { transform: scale(1.05); }
.project-card__overlay {
  position: absolute; inset: 0; background: rgba(88,166,255,0.18);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--t); color: #fff; font-size: 1.1rem;
}
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card__body { padding: 0.85rem 1rem; }
.project-card__tag {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--a2); display: block; margin-bottom: 0.28rem;
}
.project-card__body h3 { font-size: 0.85rem; font-weight: 600; color: var(--heading); line-height: 1.4; }

/* ── About ──────────────────────────────────── */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem; align-items: center; }
.about__image { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.about__content p { color: var(--text); margin-bottom: 1rem; font-size: 0.93rem; line-height: 1.8; }
.about__pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.25rem; }
.pill {
  padding: 0.3rem 0.82rem; background: rgba(188,140,255,0.1); color: var(--a2);
  border: 1px solid rgba(188,140,255,0.25); border-radius: 100px;
  font-size: 0.75rem; font-weight: 500;
}

/* ── Roles label ────────────────────────────── */
.roles__label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--a1); margin-bottom: 1rem;
}

/* ── Role card — hazelsaenz.tech articles style */
.roles-grid { margin-bottom: 2.5rem; }
.role-card {
  display: grid; grid-template-columns: 340px 1fr;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; transition: all var(--t);
}
.role-card:hover { box-shadow: var(--shadow); border-color: rgba(88,166,255,0.25); }
.role-card__img-wrap { position: relative; overflow: hidden; min-height: 240px; }
.role-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.role-card:hover .role-card__img-wrap img { transform: scale(1.04); }
.role-card__badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: rgba(13,17,23,0.75); color: var(--a1);
  border: 1px solid rgba(88,166,255,0.3); backdrop-filter: blur(6px);
  border-radius: 100px; padding: 0.25rem 0.75rem;
  font-size: 0.68rem; font-weight: 600;
}
.role-card__body { padding: 1.75rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.role-card__meta { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.role-card__meta span { font-size: 0.73rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; }
.role-card__meta i { font-size: 0.65rem; color: var(--a1); }
.role-card__title { font-size: 1.05rem; font-weight: 700; color: var(--heading); margin-bottom: 0.6rem; line-height: 1.4; }
.role-card__desc { font-size: 0.875rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; }
.role-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.role-card__tags span {
  padding: 0.22rem 0.65rem; background: rgba(88,166,255,0.08);
  color: var(--a1); border: 1px solid rgba(88,166,255,0.18);
  border-radius: var(--r-sm); font-size: 0.7rem; font-weight: 500;
}

/* ── Skills section ─────────────────────────── */
.skills-section {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.75rem 2rem;
}
.skills-section__inner { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.skills-section__img { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.skills-section__title {
  font-size: 1rem; font-weight: 700; color: var(--heading);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.skills-section__title i {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; font-size: 0.9rem;
}
.skills-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skill-badge {
  padding: 0.27rem 0.72rem; background: rgba(88,166,255,0.08);
  color: var(--a1); border: 1px solid rgba(88,166,255,0.2);
  border-radius: var(--r-sm); font-size: 0.74rem; font-weight: 500; transition: all var(--t);
}
.skill-badge:hover { background: rgba(88,166,255,0.18); transform: translateY(-1px); }

/* ── Quote ──────────────────────────────────── */
.section--quote { background: var(--bg); border-top: 1px solid var(--border); }
.blockquote { text-align: center; max-width: 680px; margin: 0 auto; }
.blockquote__icon {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 1.4rem;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
}
.blockquote__icon i { color: #fff; font-size: 1rem; }
.blockquote blockquote p {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 300; font-style: italic;
  color: var(--heading); line-height: 1.7; margin-bottom: 1.5rem;
}
.blockquote figcaption { display: flex; flex-direction: column; gap: 0.22rem; }
.blockquote figcaption strong {
  font-size: 0.95rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.blockquote figcaption span { font-size: 0.8rem; color: var(--muted); }

/* ── Footer ─────────────────────────────────── */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 1.75rem 2.5rem; }
.site-footer__inner {
  max-width: 920px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.site-footer__copy { font-size: 0.78rem; color: var(--muted); }
.site-footer__credit { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.site-footer__credit i { color: var(--a1); font-size: 0.75rem; }
.site-footer__credit a { color: var(--a1); transition: color var(--t); }
.site-footer__credit a:hover { color: var(--a2); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .about__grid   { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 900px) {
  .role-card             { grid-template-columns: 1fr; }
  .role-card__img-wrap   { min-height: 200px; max-height: 240px; }
  .skills-section__inner { grid-template-columns: 1fr; }
  .skills-section__img   { max-width: 240px; }
}
@media (max-width: 768px) {
  .nav-toggle  { display: flex; }
  .nav-overlay { display: block; }
  .sidebar     { transform: translateX(-100%); }
  .sidebar.is-open { transform: translateX(0); }
  .main        { margin-left: 0; }
  .section        { padding: 3.5rem 0; }
  .section__inner { padding: 0 1.25rem; }
  .section__title { font-size: 1.35rem; }
  .projects-grid  { grid-template-columns: repeat(2,1fr); gap: 0.85rem; }
  .hero__title    { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .hero__subtitle { font-size: 0.92rem; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .projects-grid   { grid-template-columns: 1fr; }
  .hero__actions   { flex-direction: column; }
  .btn             { width: 100%; justify-content: center; }
  .role-card__meta { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}
