:root {
  --bg: #0a0b0d;
  --surface: #131519;
  --surface-2: #191c21;
  --border: #262a31;
  --text: #e7e9ec;
  --muted: #9099a1;
  --accent: #5eead4;
  --accent-2: #f5b83d;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", monospace;
}

body {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

h1 {
  font-size: x-large;
}

/* Navbar */
.gradient {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand .led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.navbar-brand:hover .brand-logo {
  opacity: 0.85;
}

.brand-logo .bracket {
  color: var(--accent);
}

.brand-logo .brand-name {
  font-family: 'Baloo 2', var(--font-sans);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0.2rem;
  letter-spacing: -0.01em;
}

.navbar .nav-link {
  position: relative;
  color: var(--muted) !important;
  transition: color 0.2s ease;
}

.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.navbar .nav-link:hover {
  color: var(--text) !important;
}

.navbar .nav-link:hover::after {
  width: 100%;
}

/* Hero */
#Hero-Section {
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(ellipse 600px 320px at 50% 0%, rgba(94, 234, 212, 0.08), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 28px);
}

.hero-title {
  text-shadow: none;
  letter-spacing: -0.01em;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.09);
  border: 1px solid rgba(94, 234, 212, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.status-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.img-thumbnail {
  border: 2px solid var(--border);
  border-radius: 4px;
}

.thumbnail-darken {
  border: 3px solid var(--accent) !important;
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.2);
  filter: grayscale(15%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.thumbnail-darken:hover {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.image-container {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Section titles */
.title {
  padding-bottom: 3%;
  padding-top: 6%;
}

.title h2 {
  display: inline-block;
  border: none;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  background: none;
}

.title h2::before {
  content: "// ";
  color: var(--accent);
}

/* Experience timeline */
.timeline {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.pega-item {
  position: relative;
  padding: 0 0 2.25rem;
  margin-bottom: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.pega-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.job-header {
  text-align: left;
}

.cargo {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-bottom: 0.9rem;
}

.empresa {
  color: var(--accent);
  font-weight: 600;
}

.fechas {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  background: rgba(245, 184, 61, 0.08);
  border: 1px solid rgba(245, 184, 61, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

.pega-item p.lead {
  color: var(--muted);
  font-size: 1rem;
}

/* Certifications */
#Mi-Formacion p.lead {
  color: var(--muted);
}

#Mi-Formacion ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

#Mi-Formacion li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

#Mi-Formacion li::before {
  content: "✓ ";
  color: var(--accent);
}

/* Cards (portfolio) */
.card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.card-title {
  font-weight: bolder;
  color: var(--text);
}

.card-text {
  flex-grow: 1;
  color: var(--muted);
}

.card .image-container img {
  transition: transform 0.35s ease;
}

.card:hover .image-container img {
  transform: scale(1.06);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06211c;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #06211c;
  filter: brightness(0.9);
}

.card .btn-primary {
  padding: 0.5rem 1.25rem;
  margin-top: auto;
  align-self: center;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Contact form */
.contact-form {
  max-width: 640px;
  margin: 2.5rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.form-row {
  margin-bottom: 1.1rem;
  text-align: left;
}

.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15);
}

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

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn {
  width: 100%;
}

.form-status {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-height: 1.2em;
  text-align: center;
}

.form-status.ok {
  color: var(--accent);
}

.form-status.error {
  color: #ff6b6b;
}

/* Terminal card (contact page) */
.terminal-card {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.terminal-bar .tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-bar .tdot.red { background: #ff5f56; }
.terminal-bar .tdot.yellow { background: #ffbd2e; }
.terminal-bar .tdot.green { background: #27c93f; }

.terminal-bar .terminal-title {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.terminal-body {
  padding: 1.5rem 1.75rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-align: left;
}

.terminal-body .tline {
  margin: 0 0 0.3rem;
  color: var(--text);
}

.terminal-body .tline .prompt {
  color: var(--accent);
  margin-right: 0.6rem;
}

.terminal-body .tout {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
  color: var(--muted);
}

.terminal-body .tout:last-child {
  margin-bottom: 0;
}

.terminal-body .tout a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px dotted rgba(245, 184, 61, 0.4);
}

.terminal-body .tout a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-body .cursor {
    animation: none;
  }
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 3rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .display-1 {
    font-size: 2.5rem;
  }

  .job-header,
  .cargo {
    text-align: center;
  }

  .job-meta {
    justify-content: center;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .pega-item::before {
    left: -1.5rem;
  }
}
