/* Apple-inspired, clean, airy, with subtle glass and depth */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b7280;
  --accent: #0a84ff; /* iOS blue-ish */
  --card: rgba(255,255,255,0.7);
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --radius: 16px;
  --maxw: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #f2f2f3;
    --muted: #9aa0a6;
    --accent: #0a84ff;
    --card: rgba(24,24,28,0.6);
    --border: #2a2a2e;
    --shadow: 0 8px 24px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(180%) blur(20px);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.navwrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }

/* Logo del header (más grande y en blanco) */
.logo {
  width: 40px;
  height: 40px;
  vertical-align: middle;
  margin-right: 8px;
  display: inline-block;
  filter: brightness(0) invert(1); /* fuerza blanco al SVG celeste */
}

.site-title { display:flex; align-items:center; gap:8px; text-decoration:none; color:var(--fg); font-weight:700; font-size: 18px; }

.nav ul { list-style: none; display:flex; gap: 16px; margin:0; padding:0; }
.nav a { text-decoration: none; color: var(--fg); opacity:.88; padding: 8px 10px; border-radius: 10px; }
.nav a:hover { background: var(--card); opacity:1; }

.nav-toggle { display:none; font-size: 20px; background:transparent; border:0; color:var(--fg); }

@media (max-width: 820px) {
  .nav ul { display:none; }
  .nav-toggle { display:block; }
  .nav.open ul { display:flex; flex-direction: column; gap: 8px; position:absolute; right:20px; top:58px; padding:12px; background:var(--card); border:1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
}

/* Content */
.content { padding: 28px 0; }

.title-xl { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; margin: 8px 0 12px; }
.title-lg { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.015em; margin: 6px 0 8px; }
.lead { color: var(--muted); font-size: 1.05rem; }

.text-dim { color: var(--muted); }
.small { font-size: 0.92rem; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px;
}

.pill {
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: linear-gradient(180deg, rgba(10,132,255,.12), rgba(10,132,255,.06));
  border: 1px solid rgba(10,132,255,.25);
  color: var(--accent);
}

/* Buttons */
.btn {
  display:inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--accent); border:1px solid rgba(10,132,255,.4); }

.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Hero */
.hero {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(28px, 6vw, 64px);
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(10,132,255,0.2), transparent),
              radial-gradient(1000px 700px at 100% 0%, rgba(99,102,241,0.18), transparent),
              linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.5));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .hero {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(10,132,255,0.22), transparent),
                radial-gradient(1000px 700px at 100% 0%, rgba(99,102,241,0.22), transparent),
                linear-gradient(180deg, rgba(20,20,24,0.7), rgba(20,20,24,0.5));
  }
}
.hero h1 { margin: 0 0 8px; }
.hero p { margin: 0 0 18px; color: var(--muted); }
.hero .cta { display:flex; gap:12px; flex-wrap: wrap; }

/* Grids */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }

.card-link { text-decoration: none; color: inherit; }
.card-link .card:hover { transform: translateY(-2px); transition: transform .18s ease; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0; margin-top: 28px; }
.footer-links ul { list-style:none; display:flex; gap:1rem; padding:0; margin:0 0 .6rem 0; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--fg); opacity:.85; }
.footer-links a:hover { opacity:1; }

/* Disclaimer en el footer */
.site-footer .disclaimer {
  font-size: 0.8rem;       /* más chico que el resto */
  color: #9aa0a6;          /* gris tenue */
  line-height: 1.45;       /* más aire entre líneas */
  font-style: italic;      /* opcional: cursiva */
  margin-top: 0.3rem;
  max-width: 280px;        /* evita que se haga muy ancho */
}


/* Prose tweaks */
.prose p, .prose ul, .prose ol { line-height: 1.65; }
.prose code { background: rgba(125,125,125,.1); padding: 2px 6px; border-radius: 6px; }

/* TOC */
.toc { margin: 16px 0; }
.toc ul { list-style: none; padding:0; margin:.5rem 0 0 0; }
.toc li { margin:.25rem 0; }
.toc li.h3 { margin-left: 1rem; font-size: .95em; }

/* --- Navbar un poco más alto y cómodo --- */
.site-header{ padding: 0.85rem 1rem; min-height: 60px; }
.after-header{ margin-top: 16px; }

/* Contenedor centrado y ancho cómodo */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Página de inicio */
.home { padding-bottom: 2rem; }
.home-header { margin-bottom: 1.25rem; }
.home-title {
  font-size: clamp(2rem, 3.2vw + 1rem, 3rem);
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0 0 .4rem 0;
}
.home-sub { margin: 0; color: var(--fg-dim, #aaa); font-size: 1.05rem; }

/* HERO dentro de la home */
.hero { margin-top: 1rem; margin-bottom: 1rem; }
.hero-card{
  padding: 2.2rem;
  border-radius: var(--radius, 12px);
  background: radial-gradient(1200px 600px at 20% -20%, #0a84ff33 0%, transparent 60%),
              radial-gradient(1200px 600px at 80% 120%, #8a63d233 0%, transparent 60%),
              var(--surface, #161618);
  border: 1px solid var(--border, #2a2a2e);
  box-shadow: 0 10px 30px rgba(0,0,0,.25) inset, 0 1px 0 rgba(255,255,255,.03);
}
.hero-title{ font-size: clamp(1.8rem, 3.2vw + 1rem, 2.6rem); font-weight: 800; }
.hero-sub{ margin-top: .6rem; color: var(--fg-dim, #aaa); font-size: 1.05rem; max-width: 60ch; }
.hero .actions{ margin-top: 1rem; }

/* GRID de tarjetas (home) */
.home-grid{
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch; /* todas igual altura */
}
@media (max-width: 1100px){ .home-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .home-grid{ grid-template-columns: 1fr; } }

.card.link{
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface, #161618);
  border: 1px solid var(--border, #2a2a2e);
  border-radius: var(--radius, 12px);
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.20);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  height: 200px;
}
.card.link h2{ font-size: clamp(1.2rem, .6vw + 1rem, 1.6rem); margin-bottom: .5rem; }
.card.link p{ color: var(--fg-dim, #aaa); line-height: 1.45; }
.card.link:hover{
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #007aff) 60%, var(--border, #2a2a2e));
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

/* Espacio bajo el header fijo */
.after-header { margin-top: 12px; }

/* ===== Footer limpio (escudo+titulo arriba, secciones en columnas con bullets alineados) ===== */
.site-footer{
  --_fg: var(--fg, #111);
  --_muted: var(--muted, #6b7280);
  --_bd: var(--border, #e5e7eb);
  --_accent: var(--accent, #0a84ff);

  margin-top: 2.5rem;
  padding: 2rem 0 1.6rem;
  color: var(--_fg);
  font-size: .95rem;
  border-top: 1px solid var(--_bd);
}

.site-footer .container{
  max-width: var(--maxw, 1040px);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Layout general: 3 columnas (marca / secciones / créditos) */
.footer-wrap{
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* === Footer Layout: 2 columns === */
.footer{
  display: grid;
  grid-template-columns: 1fr 2fr;   /* Col 1: brand | Col 2: links */
  gap: 2rem;
  padding: 2rem 0;
}

/* === Columna 1: escudo + título en fila, disclaimer debajo === */
.footer-brand{
  display: grid;
  grid-template-columns: auto 1fr;  /* [logo][título] */
  grid-template-rows: auto auto;    /* fila1: logo+título | fila2: disclaimer */
  column-gap: .9rem;
  row-gap: .5rem;
  align-items: start;
}
.footer-brand .footer-logo{
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  align-self: start;
}
.footer-brand .footer-title{
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  margin: 0;
  font-size: 1rem;
  letter-spacing: .2px;
  align-self: start;
}
.footer-brand .footer-note{
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  margin: 0;
  line-height: 1.55;
  color: var(--_muted);
}

/* === Columna 2: Secciones en columnas con bullets alineados === */
.footer-links h4{ margin: 0 0 .6rem 0; font-size: 1rem; letter-spacing: .2px; }
.footer-links ul{ list-style: none; padding: 0; margin: 0; }

.links-mcols{
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)); /* 3 columnas desktop */
  gap: .4rem 1.25rem;
}
.links-mcols li{
  position: relative;
  padding-left: 14px;
  min-height: 28px;
  display: flex; align-items: center;
}
.links-mcols li::before{
  content: "";
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--_accent) 80%, var(--_fg));
  opacity: .95;
}
.footer-links a{
  color: var(--_fg);
  text-decoration: none;
  opacity: .92;
  transition: color .2s ease, opacity .2s ease, transform .15s ease;
}
.footer-links a:hover{
  color: var(--_accent);
  opacity: 1;
  transform: translateX(1px);
}

/* === Franja legal === */
.footer-legal{
  grid-column: 1 / -1;             /* ocupa ancho completo */
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  color: var(--_muted);
  font-size: .9rem;
}

/* Responsivo */
@media (max-width: 1100px){
  .links-mcols{ grid-template-columns: repeat(2, minmax(160px,1fr)); }
}
@media (max-width: 900px){
  .footer-wrap{ grid-template-columns: 1fr 1fr; }
  .footer-credits{ order: 3; }
  .footer-brand .footer-logo{ height: 52px; }
}
@media (max-width: 600px){
  .footer-wrap{ grid-template-columns: 1fr; }
  .links-mcols{ grid-template-columns: 1fr; }
  .footer-legal{ flex-wrap: wrap; gap: .5rem 1rem; }
}



/* SOBRE LA CÁTEDRA */
.sobre-catedra {
  display: grid;
  gap: 0.8rem;
}

.campus-link {
  display: inline-block;
  background: var(--accent, #0a84ff);
  color: #fff !important;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, transform 0.15s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.campus-link:hover {
  background: #006edc;
  transform: translateY(-2px);
}
