/* ============================================================
   global.css
   Leandro Binar Personal Website
   ============================================================ */

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

/* ── Color System ──────────────────────────────────────────── */
:root {
  --bg-primary:    #0A0A0A;
  --bg-secondary:  #111111;
  --bg-tertiary:   #1A1A1A;
  --text-primary:  #FFFFFF;
  --text-secondary:#A0A0A0;
  --text-muted:    #666666;
  --border-color:  #2A2A2A;
  --divider-color: #333333;
  --accent-primary:#3B82F6;
  --accent-hover:  #2563EB;
  --hover-light:   rgba(255,255,255,0.05);
  --hover-dark:    rgba(0,0,0,0.2);
  --success:       #22C55E;
  --nav-h:         68px;
  --radius:        12px;
  --radius-sm:     8px;
  --max-w:         1200px;
  --trans:         0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--trans);
}
a:hover { color: var(--accent-primary); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.75; }
.small-text { color: var(--text-muted); font-size: 0.82rem; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section { padding: 80px 0; }
.section-primary   { background-color: var(--bg-primary); }
.section-secondary { background-color: var(--bg-secondary); }
.divider {
  height: 1px;
  background-color: var(--divider-color);
  margin: 0;
}

/* ── Section Label ─────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.section-label::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s ease;
  line-height: 1;
  white-space: nowrap;
  border: none;
}
.btn-primary {
  background-color: #FFFFFF;
  color: #000000;
}
.btn-primary:hover {
  opacity: 0.85;
  color: #000000;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); opacity: 1; }
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--hover-light);
  color: var(--text-primary);
}
.btn-lg { padding: 13px 26px; font-size: 0.95rem; border-radius: var(--radius); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--trans), transform var(--trans);
}
.card:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
}

/* ── Tags ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 3px 9px;
  border-radius: 4px;
}
.tag-neutral {
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}
.tag-green {
  color: var(--success);
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
}

/* ── Skill Pills ────────────────────────────────────────────── */
.skill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  transition: var(--trans);
}
.skill-pill:hover {
  color: var(--text-primary);
  border-color: #3a3a3a;
  background: var(--bg-tertiary);
}

/* ── Status Badge ───────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--success);
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.18);
  padding: 5px 12px;
  border-radius: 20px;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}

/* ── Form ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--trans);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ── Grid Helpers ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Reveal Animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 64px) 0 48px;
  background: var(--bg-primary);
}
.page-header h1 { margin-bottom: 14px; }
.page-header-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--trans), border-color var(--trans);
}
#nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: opacity var(--trans);
}
.nav-logo:hover { opacity: 0.7; color: var(--text-primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--trans);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-cta {
  color: var(--text-primary) !important;
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  transition: all var(--trans) !important;
}
.nav-cta:hover {
  background: var(--hover-light) !important;
  border-color: #3a3a3a !important;
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-burger span {
  width: 20px; height: 1.5px;
  background: var(--text-muted);
  display: block;
  transition: all var(--trans);
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 32px;
  flex-direction: column;
  gap: 2px;
  z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--trans);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text-primary); background: var(--hover-light); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════
   COOKIE BANNER
══════════════════════════════════════════════════════════════ */
#cookieBanner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: min(660px, calc(100vw - 32px));
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 9999;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
}
#cookieBanner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-icon { font-size: 1.3rem; flex-shrink: 0; }
.cookie-text { flex: 1; min-width: 0; }
.cookie-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.cookie-text strong { color: var(--text-primary); font-weight: 600; }
.cookie-text a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-accept {
  background: #FFFFFF;
  color: #000000;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--trans);
  white-space: nowrap;
  border: none;
}
.cookie-accept:hover { opacity: 0.85; }
.cookie-decline {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
}
.cookie-decline:hover { color: var(--text-primary); border-color: #3a3a3a; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { padding: 0 20px; }
  .footer-inner { padding: 0 20px; }
  .section { padding: 64px 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-header { padding: calc(var(--nav-h) + 40px) 0 36px; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  #cookieBanner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { flex-direction: column; width: 100%; }
}
