/* ============================================================
   JazieLabs — Nelvin Jaziel Marquez | Portfolio
   Shared stylesheet (EN: /  ·  ES: /es/)
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-elev: #131c26;
  --bg-panel: #161f2b;
  --accent: #56d4a8;
  --accent-strong: #38bd8f;
  --accent-soft: rgba(86, 212, 168, 0.12);
  --accent-ring: rgba(86, 212, 168, 0.35);
  --text-main: #e9eef3;
  --text-soft: #c2ccd6;
  --text-muted: #8b98a5;
  --border: #223040;
  --border-soft: #1b2634;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  --maxw: 940px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 82% -8%, rgba(86, 212, 168, 0.10), transparent 60%),
    radial-gradient(700px 460px at 5% 0%, rgba(86, 212, 168, 0.06), transparent 55%),
    var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-ring); color: #06110c; }

a {
  color: var(--accent);
  text-decoration-color: rgba(86, 212, 168, 0.4);
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(20px, 5vw, 44px);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar .brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text-main), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
}

.navbar nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 550;
  font-size: 0.9rem;
  padding: 4px 2px;
  position: relative;
  transition: color 0.18s var(--ease);
}

.navbar nav a:not(.lang-switch)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.navbar nav a:not(.lang-switch):hover { color: var(--text-main); }
.navbar nav a:not(.lang-switch):hover::after { transform: scaleX(1); }

.navbar nav a.lang-switch {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.navbar nav a.lang-switch:hover {
  border-color: var(--accent-ring);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(56px, 12vw, 104px) 24px clamp(44px, 8vw, 72px);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  background: linear-gradient(180deg, var(--text-main) 40%, var(--text-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .subtitle {
  color: var(--accent);
  font-weight: 650;
  margin-top: 14px;
  font-size: clamp(1rem, 2.6vw, 1.16rem);
  letter-spacing: -0.01em;
}

.hero .brand-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}
.hero .brand-note strong { color: var(--text-soft); font-weight: 650; }

.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.hero .pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-ring);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-ring); }
  70%  { box-shadow: 0 0 0 9px rgba(86, 212, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(86, 212, 168, 0); }
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 84px) clamp(20px, 5vw, 28px);
}

section {
  margin-bottom: clamp(56px, 10vw, 92px);
  scroll-margin-top: 84px;
}
section:last-child { margin-bottom: 0; }

section h2 {
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

section h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 32px 0 16px;
}

#about p {
  margin-bottom: 15px;
  max-width: 68ch;
  color: var(--text-soft);
}
#about p strong { color: var(--text-main); font-weight: 650; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.skill-group {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.skill-group:hover {
  transform: translateY(-3px);
  border-color: var(--accent-ring);
}

.skill-group h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.skill-group ul { list-style: none; }

.skill-group li {
  font-size: 0.9rem;
  color: var(--text-soft);
  padding: 5px 0 5px 18px;
  position: relative;
}
.skill-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}

/* ---------- Highlights ---------- */
.highlights { list-style: none; }
.highlights li {
  margin-bottom: 12px;
  max-width: 70ch;
  color: var(--text-soft);
  padding-left: 26px;
  position: relative;
}
.highlights li::before {
  content: "▹";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 0.95rem;
}

/* ---------- Projects ---------- */
.section-intro { margin-bottom: 24px; }
.section-intro a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.project-card {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-ring);
  box-shadow: var(--shadow-lg);
}

.project-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-left: 14px;
  position: relative;
}
.project-card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.55;
  transition: opacity 0.28s var(--ease);
}
.project-card:hover h3::before { opacity: 1; }

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(86, 212, 168, 0.16);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.project-card > a {
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.project-card > a::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.project-card:hover > a::after { transform: translateX(4px); }

/* ---------- Contact ---------- */
#contact p { color: var(--text-soft); }

.contact-list {
  list-style: none;
  margin-top: 20px;
  display: grid;
  gap: 10px;
}
.contact-list li {
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-list li:hover {
  border-color: var(--accent-ring);
  transform: translateX(3px);
}
.contact-list a { text-decoration: none; font-weight: 600; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 36px 24px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .navbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .navbar nav { width: 100%; flex-wrap: wrap; }
  section h2 { padding-left: 11px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
