/* ============================================================
   ABEL CASTILLO — PORTFOLIO 2025
   Design: Precision Dark — Refined Minimal
   ============================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg: #04040D;
  --bg-2: #080815;
  --bg-3: #0C0C1E;
  --surface: #0F0F22;
  --surface-2: #14142A;
  --border: rgba(255, 255, 255, 0.07);
  --border-hi: rgba(99, 148, 255, 0.25);

  --blue: #6394FF;
  --blue-dim: rgba(99, 148, 255, 0.12);
  --gold: #E8B84B;
  --gold-dim: rgba(232, 184, 75, 0.12);
  --cyan: #38BDF8;

  --text: #EEEEFa;
  --text-2: #A0A0BC;
  --text-3: #5A5A7A;

  --mono: 'JetBrains Mono', monospace;
  --sans: 'Sora', sans-serif;
  --body: 'DM Sans', sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  --glow-blue: 0 0 40px rgba(99, 148, 255, 0.18);
  --glow-gold: 0 0 40px rgba(232, 184, 75, 0.15);

  --nav-h: 70px;
  --section-gap: 110px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET & BASE ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

::selection {
  background: var(--blue);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--blue-dim);
  border-radius: 4px;
}

/* ── NOISE TEXTURE OVERLAY ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── GRID BACKGROUND ─────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 148, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 148, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}

.label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.8;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

section {
  position: relative;
  z-index: 1;
  padding: var(--section-gap) 0;
}

.section-head {
  margin-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── NAV ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#navbar.scrolled {
  background: rgba(4, 4, 13, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;

  /* Color elegante (no blanco puro) */
  color: #E2E8F0;
  /* gris claro premium */
}

.nav-logo-mark {
  width: 34px;
  height: 34px;

  /* Gradiente más sofisticado */
  background: linear-gradient(135deg, #1E3A8A, #6D28D9);

  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 0.85rem;
  font-weight: 900;

  /* Blanco suavizado */
  color: #F8FAFC;

  /* Profundidad */
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--blue);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 0.3s;
}

.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);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: rgba(4, 4, 13, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.nav-drawer.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer a {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.25s;
}

.nav-drawer a:hover {
  color: var(--text);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary::before {
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.12));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 148, 255, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
  color: var(--blue);
}

.btn-ghost {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--border-hi);
}

.btn-ghost:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

/* ── HERO ────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

/* Ambient blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-blob-1 {
  width: 600px;
  height: 600px;
  background: rgba(99, 148, 255, 0.08);
  top: -100px;
  left: -200px;
}

.hero-blob-2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.07);
  bottom: -50px;
  right: -100px;
}

.hero-blob-3 {
  width: 300px;
  height: 300px;
  background: rgba(232, 184, 75, 0.05);
  top: 40%;
  right: 10%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-label {
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.1s var(--ease) forwards;
}

.hero-name {
  font-family: var(--sans);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s 0.2s var(--ease) forwards;
}

.hero-name-grad {
  background: linear-gradient(135deg, var(--blue) 0%, #A78BFA 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-2);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.3s var(--ease) forwards;
}

.hero-role-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--blue);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.4s var(--ease) forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.5s var(--ease) forwards;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeUp 0.7s 0.6s var(--ease) forwards;
}

.hero-social-link {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.9rem;
  transition: all 0.25s;
}

.hero-social-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
  transform: translateY(-2px);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.7s 1s var(--ease) forwards;
}

.hero-scroll-bar {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── STATS BAR ───────────────────────────────────────────── */
#stats {
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.stats-bar {
  display: flex;
  justify-content: space-around;
  padding: 42px 0;
  flex-wrap: wrap;
  gap: 32px;
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-number {
  font-family: var(--sans);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── ABOUT ───────────────────────────────────────────────── */
#about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-highlight {
  display: inline;
  color: var(--blue);
  font-weight: 500;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.info-card:hover {
  border-color: var(--border-hi);
  transform: translateX(6px);
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 1rem;
  flex-shrink: 0;
}

.info-meta {
  flex: 1;
}

.info-meta-label {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.info-meta-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.interest-tag {
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-2);
  font-family: var(--mono);
  transition: all 0.25s;
}

.interest-tag:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
}

/* ── SKILLS ──────────────────────────────────────────────── */
#skills {
  background: var(--bg-2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s;
}

.skill-category:hover {
  border-color: var(--border-hi);
  transform: translateY(-6px);
  box-shadow: var(--glow-blue);
}

.skill-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.icon-blue {
  background: var(--blue-dim);
  color: var(--blue);
}

.icon-gold {
  background: var(--gold-dim);
  color: var(--gold);
}

.icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #A78BFA;
}

.icon-cyan {
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
}

.icon-green {
  background: rgba(52, 211, 153, 0.1);
  color: #34D399;
}

.icon-rose {
  background: rgba(251, 113, 133, 0.1);
  color: #FB7185;
}

.skill-cat-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-tag {
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-2);
  font-family: var(--mono);
  transition: all 0.2s;
}

.skill-tag:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── PROJECTS MEJORADO ──────────────────────────────────── */
#projects {
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0 32px;
}

/* Featured project ocupa 2 columnas */
.project-card.featured {
  grid-column: span 2;
}

/* Tarjeta base */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.25s,
    box-shadow 0.35s;
  position: relative;
  backdrop-filter: blur(0px);
}

.project-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--glow-blue);
}

/* Contenedor de imagen */
.project-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--surface-2);
}

.project-card.featured .project-img-wrap {
  height: 280px;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

/* Placeholder para proyectos sin imagen real */
.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, var(--surface-2), #0a0a12);
  transition: transform 0.4s;
}

.project-img-placeholder i {
  font-size: 3rem;
  color: var(--blue);
  opacity: 0.6;
  transition: all 0.3s;
}

.project-card:hover .project-img-placeholder i {
  opacity: 1;
  transform: scale(1.1);
}

/* Overlay elegante con blur y botón centrado */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 13, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay .btn-sm {
  transform: translateY(12px);
  transition: transform 0.3s ease;
  background: var(--blue);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-overlay .btn-sm {
  transform: translateY(0);
}

/* Cuerpo de la tarjeta */
.project-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.project-number {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
  background: rgba(99, 148, 255, 0.1);
  display: inline-block;
  width: fit-content;
  padding: 2px 10px;
  border-radius: 20px;
}

.project-title {
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.2s;
}

.project-card.featured .project-title {
  font-size: 1.4rem;
}

.project-desc {
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

.stack-tag {
  padding: 4px 10px;
  background: var(--blue-dim);
  border: 1px solid var(--border-hi);
  border-radius: 30px;
  font-size: 0.7rem;
  color: var(--blue);
  font-family: var(--mono);
  transition: all 0.2s;
}

.stack-tag:hover {
  background: rgba(99, 148, 255, 0.2);
  transform: translateY(-1px);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.project-link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 0.9rem;
  transition: all 0.25s;
}

.project-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
  transform: translateY(-2px);
}

/* Featured badge extra */
.project-card.featured .project-number {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--blue);
}

/* ========== REVEAL ANIMATION ========== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1),
    transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .project-card.featured .project-img-wrap {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-body {
    padding: 18px 20px 20px;
  }

  .project-title {
    font-size: 1rem;
  }

  .project-card.featured .project-title {
    font-size: 1.2rem;
  }
}

/* ── CERTS ───────────────────────────────────────────────── */
#certs {
  background: var(--bg-2);
}

.certs-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  cursor: grab;
}

.certs-scroll:active {
  cursor: grabbing;
}

.certs-scroll::-webkit-scrollbar {
  height: 3px;
}

.certs-scroll::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 3px;
}

.cert-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.cert-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-4px);
}

.cert-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.cert-info {
  padding: 14px 16px;
}

.cert-issuer {
  font-size: 0.68rem;
  color: var(--blue);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cert-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ── CONTACT ─────────────────────────────────────────────── */
#contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info-title {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.contact-info-desc {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 0.88rem;
  transition: all 0.25s;
}

.contact-link-item:hover {
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateX(6px);
}

.contact-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--blue-dim);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Contact Form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.78rem;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--body);
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(99, 148, 255, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-3);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  width: 100%;
  padding: 14px;
  justify-content: center;
}

.form-status {
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
  border-radius: var(--r-sm);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(52, 211, 153, 0.1);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.form-status.error {
  display: block;
  background: rgba(251, 113, 133, 0.1);
  color: #FB7185;
  border: 1px solid rgba(251, 113, 133, 0.2);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-3);
  font-family: var(--mono);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--text-2);
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(1.2);
    transform-origin: top;
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 72px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-drawer {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

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

  .project-card.featured {
    grid-column: span 1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats-bar {
    gap: 24px;
  }

  .hero-name {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .contact-form {
    padding: 24px 20px;
  }
}