/* =========================================================
   Trabajo Práctico SO2 · Desempeño 2 · Explorando Linux
   Dark moderno con vibe terminal/Linux
   ========================================================= */

:root {
  --bg: #0a0e14;
  --bg-elev: #121821;
  --bg-elev-2: #1a2230;
  --border: #2a3441;
  --border-soft: #1e2632;

  --text: #e6edf3;
  --text-dim: #8b98a5;
  --text-muted: #5d6975;

  --accent: #4ade80;
  --accent-glow: rgba(74, 222, 128, 0.35);
  --accent-soft: rgba(74, 222, 128, 0.12);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --danger: #f87171;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 30px -10px rgba(0, 0, 0, 0.5);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Animated background dots — subtle terminal grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(74, 222, 128, 0.06), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.05), transparent 45%),
    linear-gradient(rgba(42, 52, 65, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 52, 65, 0.18) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #6ee7a3; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--text-dim); }
p strong, li strong { color: var(--text); }

ul { padding-left: 1.2rem; }
li { margin-bottom: .35rem; color: var(--text-dim); }

::selection { background: var(--accent-soft); color: var(--text); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}
.section--tight { padding: 3rem 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .35rem .8rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: var(--accent-soft);
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(1.25); }
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 14, 20, 0.72);
  border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.nav__brand-logo {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  box-shadow: 0 0 20px var(--accent-glow);
  object-fit: cover;
  display: block;
  flex: none;
}

.nav__brand-text small {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0; padding: 0;
}

.nav__links a {
  color: var(--text-dim);
  padding: .55rem .9rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  transition: all .15s ease;
}
.nav__links a:hover {
  color: var(--text);
  background: var(--bg-elev);
}
.nav__links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 40px; height: 40px;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav__links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav__toggle { display: grid; place-items: center; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero__inner { max-width: 860px; }
.hero__logo {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 18px;
  margin: 0 0 1.5rem;
  box-shadow: 0 0 40px var(--accent-glow), var(--shadow-md);
  background: var(--bg-elev-2);
  object-fit: cover;
}
.hero__title {
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.hero__lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 720px;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: .8rem;
  margin-top: 2rem;
}

/* Floating decorative blobs in hero */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  pointer-events: none;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}
.hero__blob--1 { width: 360px; height: 360px; background: var(--accent); top: -80px; right: -60px; }
.hero__blob--2 { width: 280px; height: 280px; background: var(--cyan); bottom: -80px; left: 10%; animation-delay: -4s; }
.hero__blob--3 { width: 220px; height: 220px; background: var(--violet); top: 30%; right: 35%; animation-delay: -8s; opacity: .25; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -25px) scale(1.08); }
  66%      { transform: translate(-20px, 30px) scale(0.95); }
}

/* Smaller hero for inner pages */
.hero--inner { padding: 4rem 0 2rem; }
.hero--inner .hero__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { margin: 0 .5rem; color: var(--border); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--accent);
  color: #0a0e14;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.btn--primary:hover { background: #6ee7a3; color: #0a0e14; box-shadow: 0 14px 36px -8px var(--accent-glow); }

.btn--ghost {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-elev-2); color: var(--text); border-color: var(--accent); }

.btn--whatsapp {
  background: #25D366;
  color: #0a0e14;
  box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.4);
}
.btn--whatsapp:hover { background: #2ee878; color: #0a0e14; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}

.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.card h3 { margin-bottom: .5rem; color: var(--text); }
.card p:last-child { margin-bottom: 0; }

/* ---------- Tarjeta institucional ---------- */
.institutional {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 2rem;
}
.institutional__logo {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 24px var(--accent-glow);
  background: var(--bg-elev-2);
  display: block;
}
.institutional h3 { margin: 0 0 .35rem; }
.institutional p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.institutional p + p { margin-top: .35rem; }
@media (max-width: 540px) {
  .institutional { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.grid {
  display: grid;
  gap: 1.25rem;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Stat / metric cards */
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}
.stat__value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.stat__label {
  font-size: .82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0;
}

/* ---------- Code blocks ---------- */
pre, code {
  font-family: var(--font-mono);
  font-size: .9rem;
}

code:not(pre code) {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  padding: .12rem .45rem;
  border-radius: 6px;
  color: var(--accent);
  font-size: .85em;
}

pre {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  line-height: 1.55;
  position: relative;
  color: var(--text);
}
pre::before {
  content: "$";
  position: absolute;
  left: .65rem; top: 1rem;
  color: var(--accent);
  font-weight: 700;
  opacity: .55;
}
pre code { padding-left: 1rem; display: block; color: var(--text); background: none; border: 0; }
pre.no-prompt::before { content: ""; }
pre.no-prompt code { padding-left: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
thead { background: var(--bg-elev-2); }
th, td {
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
th { color: var(--accent); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-elev); }

/* ---------- Image placeholders ---------- */
.figure {
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}
.figure img {
  width: 100%;
  display: block;
}
.figure figcaption {
  padding: .8rem 1.1rem;
  font-size: .85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
}

.placeholder {
  display: grid;
  place-items: center;
  min-height: 240px;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-elev),
    var(--bg-elev) 10px,
    var(--bg-elev-2) 10px,
    var(--bg-elev-2) 20px
  );
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .9rem;
  text-align: center;
  padding: 1.5rem;
}
.placeholder::before {
  content: "📷";
  display: block;
  font-size: 2rem;
  margin-bottom: .5rem;
  opacity: .6;
}

/* ---------- Phase / Fase block ---------- */
.phase {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-soft);
}
.phase:first-of-type { border-top: none; }
.phase__num {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.phase h3 { margin-top: 0; }

@media (max-width: 640px) {
  .phase { grid-template-columns: 1fr; gap: .5rem; }
  .phase__num { font-size: 1.8rem; }
}

/* ---------- Callout / blockquote ---------- */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }
.callout--warning { border-left-color: var(--amber); background: rgba(251, 191, 36, 0.08); }
.callout--info    { border-left-color: var(--cyan);  background: rgba(34, 211, 238, 0.08); }

/* ---------- Team / Nosotros cards ---------- */
.team {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.team-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}
.team-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet));
  transform: translateX(-100%);
  transition: transform .4s ease;
}
.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}
.team-card:hover::before { transform: translateX(0); }

.team-card__avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), rgba(34, 211, 238, 0.15));
  border: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
}
.team-card__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.team-card__name { font-size: 1.2rem; margin-bottom: .15rem; color: var(--text); }
.team-card__role { color: var(--text-muted); font-size: .85rem; margin-bottom: 1.2rem; font-family: var(--font-mono); }
.team-card__phone { display: block; color: var(--text-dim); font-size: .9rem; margin-bottom: .35rem; font-family: var(--font-mono); }
.team-card__email {
  display: inline-block;
  color: var(--text-dim);
  font-size: .85rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  word-break: break-all;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color .2s ease, border-color .2s ease;
}
.team-card__email:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 4rem;
  background: var(--bg-elev);
  border-top: 1px solid var(--border-soft);
  padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 2.5rem;
}
.footer__brand p { color: var(--text-muted); font-size: .9rem; max-width: 360px; }
.footer h4 { color: var(--text); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .55rem; }
.footer li a { color: var(--text-dim); font-size: .9rem; }
.footer li a:hover { color: var(--accent); }

.footer__bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .8rem;
  font-family: var(--font-mono);
}

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Reveal animation on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- Misc utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1.2rem; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
  border: 0;
}

/* Tag / pill */
.tag {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-soft);
  font-size: .78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin: .15rem;
}
.tag--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.tag--cyan   { background: rgba(34, 211, 238, 0.1); color: var(--cyan); border-color: rgba(34, 211, 238, 0.2); }
.tag--violet { background: rgba(167, 139, 250, 0.1); color: var(--violet); border-color: rgba(167, 139, 250, 0.2); }
