/* Alejandro Suarez - static portfolio styles */

:root {
  --background: #0a0a0a;
  --foreground: #e8e8e8;
  --card: #141414;
  --muted: #3f3f3f;
  --muted-foreground: #a0a0a0;
  --border: #2b2b2b;
  --primary: #39d0d8;        /* cyan */
  --primary-foreground: #0a0a0a;
  --accent: #b24bf3;         /* purple */
  --accent-foreground: #ffffff;
  --destructive: #f05252;
  --radius: 0.625rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }

.font-mono { font-family: ui-monospace, "SF Mono", "Geist Mono", Menlo, Monaco, "Cascadia Code", monospace; }

/* Color helpers mapped to CSS variables (CDN Tailwind can't read @theme tokens) */
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.bg-background { background-color: var(--background); }
.bg-primary { background-color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.border-border { border-color: var(--border); }
.border-primary { border-color: var(--primary); }

/* Gradient text used in heroes/titles */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--foreground), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gradient-text-2 {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Glass card */
.glass-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.animate-fade-in-up { animation: fadeInUp 1s ease-out; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

@keyframes bounce {
  0%,100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce { animation: bounce 1s infinite; }

@keyframes pulse { 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #141414; }
::-webkit-scrollbar-thumb { background: #3f3f3f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #595959; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(57,208,216,0.3); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(57,208,216,0.5); }

/* ===== Language switcher ===== */
.lang-switcher { position: relative; z-index: 100; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 9999px; cursor: pointer;
  background: rgba(15,23,42,0.6); backdrop-filter: blur(12px);
  border: 1px solid rgba(57,208,216,0.3); color: var(--foreground);
  transition: all .2s ease;
}
.lang-btn:hover { border-color: rgba(57,208,216,0.5); transform: scale(1.05); }
.lang-flag { font-size: 1.5rem; line-height: 1; }
.lang-code { font-size: .875rem; }
.lang-caret { width: 16px; height: 16px; transition: transform .2s ease; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; margin-top: 8px; width: 16rem;
  background: rgba(15,23,42,0.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(57,208,216,0.3); border-radius: 14px;
  overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
  display: none;
}
.lang-menu.open { display: block; animation: fadeInUp .2s ease-out; }
.lang-menu-head { padding: 8px; border-bottom: 1px solid rgba(57,208,216,0.2); background: rgba(57,208,216,0.05); }
.lang-menu-head p { margin: 0; padding: 0 8px; font-size: .75rem; color: var(--muted-foreground); }
.lang-list { max-height: 24rem; overflow-y: auto; }
.lang-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: none; border: none; cursor: pointer;
  color: var(--foreground); text-align: left; transition: background .15s ease;
}
.lang-item:hover { background: rgba(57,208,216,0.1); }
.lang-item.active { background: rgba(57,208,216,0.2); border-left: 2px solid var(--primary); }
.lang-item .name { font-size: .875rem; font-weight: 500; }
.lang-item .code { font-size: .75rem; color: var(--muted-foreground); }
.translating-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,10,10,0.8); backdrop-filter: blur(4px);
}
.translating-overlay.open { display: flex; }
.spinner {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid rgba(57,208,216,0.3); border-top-color: var(--primary);
  animation: spin 1s linear infinite; margin: 0 auto 1rem;
}

/* ===== Thanos gauntlet button ===== */
.gauntlet-btn {
  position: fixed; bottom: 30px; left: 30px;
  width: 50px; height: 50px; border-radius: 50%;
  background: #2d1b4e; border: 2px solid #ffd700; color: #ffd700;
  font-size: 24px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 0 15px rgba(124,58,237,0.5);
  transition: all .3s cubic-bezier(0.175,0.885,0.32,1.275);
  z-index: 1000; overflow: hidden;
}
.gauntlet-btn:hover { transform: scale(1.1) rotate(-10deg); box-shadow: 0 0 25px rgba(255,215,0,0.6); }
.gauntlet-btn:active { transform: scale(0.9); }
.gauntlet-btn.snapping { animation: gauntlet-snap .5s ease forwards; }
.gauntlet-btn.restoring { animation: gauntlet-snap 1s ease forwards; background: #1a9f29; border-color: #fff; color: #fff; }
@keyframes gauntlet-snap {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(-15deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.dust-particle { position: absolute; background-repeat: no-repeat; background-size: cover; animation: dust-drift 1.5s ease-out forwards; }
@keyframes dust-drift {
  0% { opacity: 1; transform: translate(0,0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)); }
}
.disintegrated { visibility: hidden !important; transition: visibility 0s 1.5s; }
.reintegrating { animation: time-rewind 1.5s ease-in forwards; }
@keyframes time-rewind {
  0% { opacity: 0; transform: translateY(20px) scale(0.9); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ===== Topbar / mobile menu ===== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.2) blur(10px);
  background: rgba(15,23,42,0.95);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--foreground); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px rgba(124,58,237,0.45); animation: pulse-glow 2s ease-in-out infinite; }
@keyframes pulse-glow { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }
.hamburger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: rgba(15,23,42,0.95); transition: all .2s ease; }
.hamburger:hover { box-shadow: 0 0 0 3px rgba(124,58,237,0.45); border-color: var(--primary); }
.hamburger span { width: 20px; height: 2px; background: var(--foreground); transition: all .3s ease; border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }
.mobile-menu {
  position: fixed; top: 65px; left: 0; right: 0;
  background: rgba(15,23,42,0.98); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 20px;
  transform: translateY(-100%); opacity: 0; transition: all .3s ease;
  z-index: 39; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 400px; margin: 0 auto; border-radius: 0 0 14px 14px;
}
.mobile-menu.active { transform: translateY(0); opacity: 1; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu-link { padding: 14px 18px; border-radius: 10px; text-decoration: none; color: var(--foreground); font-size: 16px; font-weight: 500; transition: all .2s ease; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; gap: 12px; }
.mobile-menu-link:hover { background: rgba(15,23,42,0.95); border-color: var(--primary); transform: translateX(4px); box-shadow: 0 4px 12px rgba(124,58,237,0.45); }
.mobile-menu-link i { width: 24px; text-align: center; font-size: 18px; color: var(--primary); }

/* ===== Journey page ===== */
.hero { max-width: 1100px; margin: 40px auto 60px; padding: 40px 20px; text-align: center; position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); font-size: 14px; color: var(--primary); margin-bottom: 20px; font-weight: 600; }
.hero-badge i { font-size: 16px; animation: pulse-glow 2s ease-in-out infinite; }
.hero-title { font-size: clamp(36px,6vw,64px); line-height: 1.1; margin: 0 0 16px; background: linear-gradient(135deg, var(--primary), var(--accent)); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gradient-shift 8s ease infinite; font-weight: 800; }
@keyframes gradient-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-subtitle { font-size: clamp(18px,3vw,24px); color: var(--muted-foreground); margin: 0 0 12px; font-weight: 500; }
.hero-tagline { font-size: clamp(14px,2vw,16px); color: var(--muted-foreground); font-style: italic; margin: 0; }
.hero-stats { display: flex; gap: 24px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-number { font-size: 32px; font-weight: 700; color: var(--primary); display: block; }
.hero-stat-label { font-size: 13px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .5px; }
.container { max-width: 1100px; margin: 0 auto 80px; padding: 0 20px; position: relative; z-index: 1; }
.section-title { font-size: 28px; font-weight: 700; margin: 0 0 40px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 12px; }
.section-title i { color: var(--primary); font-size: 32px; }
.timeline { position: relative; padding: 20px 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--primary), var(--accent)); transform: translateX(-50%); }
.journey-timeline .timeline-item { position: relative; display: flex; margin-bottom: 40px; }
.journey-timeline .timeline-item:nth-child(odd) { justify-content: flex-start; }
.journey-timeline .timeline-item:nth-child(even) { justify-content: flex-end; }
.timeline-marker { position: absolute; left: 50%; transform: translateX(-50%); width: 60px; height: 60px; border-radius: 50%; background: var(--card); border: 4px solid var(--primary); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 0 0 8px rgba(124,58,237,0.45); z-index: 2; }
.timeline-marker i { color: var(--primary); }
.timeline-year { font-size: 24px; font-weight: 700; color: var(--primary); margin: 0 0 8px; }
.timeline-title { font-size: 20px; font-weight: 600; color: var(--foreground); margin: 0 0 12px; }
.timeline-description { color: var(--muted-foreground); margin: 0 0 16px; line-height: 1.6; }
.timeline-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-badge { padding: 4px 10px; border-radius: 6px; background: rgba(15,23,42,0.95); border: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 4px; }
.tech-badge i { font-size: 13px; }
.timeline-content { width: calc(50% - 40px); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: 0 10px 30px rgba(2,6,23,0.6); transition: transform .3s ease, box-shadow .3s ease; }
.timeline-content:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(2,6,23,0.2); }
.era-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.era-badge.era-1 { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; }
.era-badge.era-2 { background: linear-gradient(135deg,#f093fb,#f5576c); color: #fff; }
.era-badge.era-3 { background: linear-gradient(135deg,#4facfe,#00f2fe); color: #fff; }
.era-badge.era-4 { background: linear-gradient(135deg,#43e97b,#38f9d7); color: #fff; }
.era-badge.era-5 { background: linear-gradient(135deg,#fa709a,#fee140); color: #fff; }
.scroll-top { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(124,58,237,0.45); opacity: 0; transform: translateY(20px); transition: all .3s ease; z-index: 50; }
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(124,58,237,0.45); }
.scroll-top svg { width: 24px; height: 24px; }
@media (max-width: 768px) {
  .timeline::before { left: 30px; }
  .journey-timeline .timeline-item { flex-direction: column !important; align-items: flex-start; padding-left: 80px; justify-content: flex-start !important; }
  .timeline-content { width: 100%; }
  .timeline-marker { left: 30px; width: 50px; height: 50px; font-size: 20px; }
  .hero-stats { gap: 16px; }
}

/* ===== Home tabs ===== */
.tab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border: none; cursor: pointer; border-radius: 8px;
  background: transparent; color: var(--muted-foreground);
  font-family: ui-monospace, "Geist Mono", monospace; font-size: .95rem;
  transition: all .2s ease;
}
/* Grid cell must be allowed to shrink below its content width, otherwise long labels widen the page */
.tab-btn { min-width: 0; }
@media (max-width: 600px) {
  .tab-btn { flex-direction: column; gap: 4px; padding: 8px 2px; font-size: .6rem; overflow-wrap: anywhere; }
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active { background: rgba(57,208,216,0.15); color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Home milestone timeline ===== */
.ms-timeline { position: relative; }
.ms-line { position: absolute; top: 0; bottom: 0; width: 4px; left: 16px; opacity: .3; background: linear-gradient(180deg, var(--primary), var(--accent), #f97316); }
.ms-item { position: relative; margin-bottom: 6rem; padding-left: 48px; }
.ms-dot { position: absolute; left: 16px; top: 4px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--background); z-index: 20; }
.ms-grid { }
.ms-card { padding: 24px; border-radius: 14px; transition: transform .5s ease, border-color .3s ease; }
.ms-card:hover { transform: scale(1.02); }
.ms-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ms-col-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; margin: 0 0 12px; padding-bottom: 4px; border-bottom: 1px solid; }
.ms-list { list-style: none; margin: 0; padding: 0; font-family: ui-monospace, "Geist Mono", monospace; font-size: .875rem; }
.ms-list li { margin-bottom: 4px; overflow-wrap: anywhere; }
.ms-year-ghost { font-size: 3.75rem; font-weight: 900; color: var(--muted); opacity: .2; user-select: none; line-height: 1; margin: 0 0 4px; }
.ms-badge { display: inline-block; padding: 4px 12px; font-family: ui-monospace, "Geist Mono", monospace; font-size: .75rem; border-radius: 6px; border: 1px solid; margin-bottom: 8px; }
.ms-head-title { font-size: 1.875rem; font-weight: 700; color: var(--foreground); margin: 0 0 8px; }
.ms-desc { color: var(--muted-foreground); font-size: .875rem; line-height: 1.6; margin: 0; }

/* color variants for milestone items */
.c-cyan    { --c: #06b6d4; --cg: rgba(6,182,212,0.8); }
.c-indigo  { --c: #6366f1; --cg: rgba(99,102,241,0.8); }
.c-pink    { --c: #ec4899; --cg: rgba(236,72,153,0.8); }
.c-emerald { --c: #10b981; --cg: rgba(16,185,129,0.8); }
.c-orange  { --c: #f97316; --cg: rgba(249,115,22,0.8); }
.ms-item .ms-dot { background: var(--c); box-shadow: 0 0 20px var(--cg); }
.ms-item .ms-badge { color: var(--c); border-color: color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 18%, transparent); }
.ms-item .ms-col-title { color: var(--c); border-color: color-mix(in srgb, var(--c) 20%, transparent); }
.ms-item .ms-card:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent) !important; }

@media (min-width: 768px) {
  .ms-line { left: 50%; }
  .ms-item { display: flex; align-items: center; justify-content: space-between; padding-left: 0; }
  .ms-dot { left: 50%; top: 50%; transform: translate(-50%,-50%); }
  .ms-item .ms-head { width: 50%; padding: 0 48px; position: relative; }
  .ms-item .ms-cardwrap { width: 50%; padding: 0 48px; }
  .ms-item.side-right { flex-direction: row; }
  .ms-item.side-left { flex-direction: row-reverse; }
  .ms-item.side-right .ms-head { text-align: right; }
}

/* line clamp for portfolio descriptions */
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* prose for 888 page */
.prose p { margin: 0 0 1.25rem; line-height: 1.75; }
.prose h2 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin: 2rem 0 1rem; }
.callout { border-radius: 8px; padding: 1.5rem; margin: 1.5rem 0; }
.callout-primary { background: rgba(57,208,216,0.1); border: 1px solid rgba(57,208,216,0.2); }
.callout-accent { background: rgba(178,75,243,0.1); border: 1px solid rgba(178,75,243,0.2); }

/* ═══════════════════════════════════════════════════════
   CONTRACTOR BAND · Journey timeline (2019–2024)
   Banda horizontal que corre detrás de varios hitos,
   mostrando que fue trabajo transversal y paralelo.
   ═══════════════════════════════════════════════════════ */
.ct-band-wrap {
  position: relative;
  /* banda izquierda como borde de color continuo */
  border-left: 3px solid rgba(239, 68, 68, 0.35);
  margin-left: -3px;
  padding-left: 3px;
}

/* gradiente de fondo sutil que atraviesa todos los hitos */
.ct-band-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.04) 0%,
    transparent 60%
  );
  pointer-events: none;
  border-radius: 8px;
  z-index: 0;
}

/* etiqueta de la banda */
.ct-band-label {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 1.5rem 0;
  position: relative;
  z-index: 1;
}

.ct-band-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  background: color-mix(in srgb, #ef4444 12%, var(--card, #0f172a));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  text-align: left;
}

.ct-band-pill:hover {
  background: color-mix(in srgb, #ef4444 22%, var(--card, #0f172a));
  border-color: #ef4444;
  transform: translateY(-2px);
}

.ct-band-pill .fa-briefcase {
  color: #ef4444;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.ct-band-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ef4444;
  white-space: nowrap;
}

.ct-band-years {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  color: rgba(239, 68, 68, 0.8);
  white-space: nowrap;
}

.ct-band-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground, #94a3b8);
  white-space: nowrap;
}

.ct-band-play {
  color: #ef4444;
  font-size: 0.7rem;
  flex: 0 0 auto;
}

/* En móvil: ocultar el sub-texto para no hacer el pill demasiado ancho */
@media (max-width: 640px) {
  .ct-band-sub { display: none; }
  .ct-band-years { display: none; }
  .ct-band-label { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════
   CONTRACTOR CARD · timeline-item contenedor con sub-cards
   ═══════════════════════════════════════════════════════ */

/* el card contenedor ocupa el ancho completo en el timeline */
.timeline-item--wide {
  justify-content: center !important;
  width: 100%;
}

.timeline-item--wide .timeline-content--contractor {
  width: calc(100% - 80px);
  max-width: 860px;
}

/* marcador con color del contractor */
.timeline-marker--contractor {
  background: color-mix(in srgb, #ef4444 18%, var(--card, #0f172a)) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 8px rgba(239,68,68,0.2) !important;
}
.timeline-marker--contractor i { color: #ef4444 !important; }

/* card principal del contractor */
.timeline-content--contractor {
  border-color: rgba(239,68,68,0.3) !important;
  background: color-mix(in srgb, #ef4444 4%, var(--card, #0f172a)) !important;
  position: relative;
  overflow: hidden;
}
.timeline-content--contractor::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.contractor-header { margin-bottom: 1.25rem; }

/* sub-cards grid */
.contractor-subcards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}

.contractor-subcard {
  background: var(--card, #0f172a);
  border: 1px solid var(--border, #1e293b);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s, transform 0.15s;
}
.contractor-subcard:hover {
  border-color: rgba(239,68,68,0.35);
  transform: translateY(-2px);
}

.contractor-subcard-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.contractor-subcard-year {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted-foreground, #94a3b8);
}

.contractor-subcard-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--foreground, #e8ecf4);
  margin: 0 0 0.35rem;
}

.contractor-subcard-desc {
  font-size: 0.82rem;
  color: var(--muted-foreground, #94a3b8);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 640px) {
  .contractor-subcards { grid-template-columns: 1fr; }
  .timeline-item--wide .timeline-content--contractor { width: 100%; }
}

/* Sub-card de ancho completo (AI Era dentro del contractor) */
.contractor-subcard--full {
  grid-column: 1 / -1;
}
