/* Estilos para la página de estudiante */
:root {
    --bg: #101116;
    --surface: rgba(255, 255, 255, 0.07);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --surface-strong: rgba(255, 255, 255, 0.10);
    --accent: #f8fafc;
    --accent-soft: #c7d2dd;
    --text: #f8fafc;
    --text-muted: #b8c2cc;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
}

* {
    box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
.boton-flotante {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  color: #fff;
  text-decoration: none;
  z-index: 100;
  transition: transform 0.2s ease, background 0.2s ease;
}

.boton-flotante:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.18);
}

.boton-flotante .material-icons {
  font-size: 28px;
}

body {
    margin: 0;
    font-family: "faustina",     serif;
    font-weight: var(--font-regular);
    background: #141822;
    color: var(--text);
    cursor: url("../img/autof1.png"), auto;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-size: clamp(1.3rem, 1.15vw, 0.8rem);
    padding-top: 100px;
}

.topbar {
    position: fixed;
    inset: 0 0 auto;
    height: 75px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    z-index: 50;
    border-bottom-right-radius: 28px;
    border-bottom-left-radius: 28px;
}

.topbar-logo {
    height: 64px;
    width: auto;
    display: block;
    object-fit: contain;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.topbar-menu-button {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.topbar-menu-button:hover,
.topbar-menu-button:focus {
    background: rgba(255, 255, 255, 0.08);
}

.topbar-menu-button img {
    width: 28px;
    height: 28px;
    display: block;
}

.topbar-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    font-weight: var(--font-medium);
    letter-spacing: 0.07em;
    transition: color 0.2s ease;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 55;
}

.mobile-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    max-width: 320px;
    height: 100vh;
    background: rgba(20, 24, 34, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    transform: translateX(110%);
    transition: transform 0.3s ease;
    z-index: 60;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-close {
    margin: 0 0 24px auto;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: var(--font-medium);
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.topbar-link:hover,
.topbar-link:focus {
    color: var(--accent);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../img/fondo.jpg") center/cover no-repeat;
    filter: blur(12px) brightness(0.65);
    opacity: 0.85;
    z-index: -1;
    transform: scale(1.05);
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 40px 24px 56px;
}

header {
    margin-top: -10px;
    display: grid;
    gap: 0px;    align-items: center;    align-items: stretch;
    grid-template-columns: 1fr auto;
    padding: 0px 0 40px;
    animation: slideDownHeader 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

header h1 {
    margin: 5px 0 0;
    font-size: clamp(4rem, 4.5vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.000em;
    font-weight: var(--font-semibold);
    color: rgb(255, 255, 255);
}

header p {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 500px;
}
header h3 {
    padding: 20px 0 0;
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0em;
    color: var(--accent-soft);
    font-weight: var(--font-regular);
}
.teammates-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    max-width: 500px;
}

.teammates-header h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0em;
    color: var(--accent);
    font-weight: var(--font-medium);
}

.teammates-list {
    display: flex;
    gap: 10px;
    align-items: center;
}

.teammate-link {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.teammate-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.28);
}

.teammate-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar {
    width: 300px;
    height: 300px;
    border-radius: 30px;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section {
    background: var(--surface);
    border-radius: 28px;
    border: 0px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    padding: 38px;
    margin-bottom: 30px;
}

.accordion {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 1rem;
    font-weight: var(--font-medium);
    text-align: left;
    cursor: pointer;
}

.accordion-trigger:hover,
.accordion-trigger:focus {
    background: rgba(255, 255, 255, 0.08);
}

.accordion-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.25s ease;
}

.accordion-icon.open {
    transform: rotate(90deg);
}

.accordion-item {
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item.open {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.accordion-panel {
    padding: 0px 20px 18px;
    color: var(--text-muted);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
}

.accordion-panel[hidden] {
    display: block !important;
    max-height: 0;
    opacity: 0;
    padding: 0px 20px 0px;
}

.accordion-item.open .accordion-panel:not([hidden]) {
    max-height: 1000px;
    opacity: 1;
    padding: 18px 20px 18px;
}

.accordion-panel ul {
    margin: 0;
    padding-left: 30px;
}

.accordion-panel li {
    margin-bottom: 10px;
    line-height: 1.55;
}

.proyecto  {
    height: 700px;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    background: var(--surface);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 80px 24px;
    margin-bottom: 30px;
}
.proyecto h2 {
    margin: 0 0 12px;
    margin-left: 425px;
    text-align: left;
    font-size: 3rem;
    color: var(--accent);
    font-weight: var(--font-medium);
}

.proyecto p {
    line-height: 1.5;
    color: var(--text-muted);
    margin-left: 425px;
    text-align: left;
}

.section h2 {
    margin: 0 0 12px;
    font-size: 1.7rem;
    color: var(--accent);
    font-weight: var(--font-medium);
}

.section p,
.section li {
    line-height: 1.5;
    color: var(--text-muted);
}

.grid-two {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.carousel-wrapper * {
    user-select: none;
}

.carousel-wrapper.grabbing {
    cursor: grabbing;
}

.carousel-grid {
    display: flex;
    gap: 16px;
    width: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}

.card {
    flex: 0 0 350px;
    width: 350px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border: 0px solid rgba(255, 255, 255, 0.10);
    border-radius: 26px;
    padding: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.20);
    display: flex;
    flex-direction: column;
    gap: 0px;
    scroll-snap-align: start;
    
}

.card ul {
    display: flex; /* Opcional: si quieres quitar los puntos */
    flex-direction: column;
    align-items: flex-start; /* Alinea los items al inicio horizontal */
}

.card li {
    margin-bottom: 8px; /* Espaciado uniforme entre items */
    font-size: 0.95rem;
    padding: 6px;       /* Elimina el espacio interno izquierdo */
    margin: 0;        /* Elimina espacios externos */
    line-height: 1;   /* Mantiene la altura de línea constante */
}

.card-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--accent-soft);

}

.card-subtitle {
    display: block;
    color: var(--accent);
    font-size: 1rem;
    font-weight: var(--font-regular);
    line-height: 1.05;
}

.card-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.carousel-wrapper::-webkit-scrollbar {
    height: 12px;
}

.carousel-wrapper::-webkit-scrollbar-thumb {
    background: rgba(248, 250, 252, 0.35);
    border-radius: 999px;
}

.carousel-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

@media (max-width: 720px) {
    header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .avatar {
        margin: 0 auto;
    }
    .grid-two {
        grid-template-columns: 1fr;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: var(--font-medium);
    font-size: 0.95rem;
}

.link-button {
    display: inline-block;
    margin-top: 16px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
    color: var(--accent);
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: var(--font-medium);
}
.site-footer {
      background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top-right-radius: 28px;
    border-top-left-radius: 28px;
    color: #d1d5db;
    padding: 24px 20px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.7;
}

.site-footer p {
    margin: 0;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.featured-work {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 28px;
    height: 600px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.25);
}

.featured-work img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 20px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.2s ease;
    cursor: pointer;
}

.featured-work img.visible {
    opacity: 1;
}

.contact-section p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.contact-link {
    display: inline-flex;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    outline: none;
}

.contact-link:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.contact-link:focus {
    outline: none;
}

.contact-link img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: transparent;
    border: none;
}

.section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-heading-row h2 {
    margin: 0;
    line-height: 1.05;
}

.portfolio-link {
    display: inline-block;
    color: var(--accent-soft);
    line-height: 1.05;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: var(--font-medium);
    transition: transform 0.25s ease, color 0.25s ease;
}

.portfolio-link:hover,
.portfolio-link:focus {
    transform: scale(1.05);
    color: #ffffff;
}

/* Efecto fade para materias */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card-subtitle {
    display: inline-block;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.card-subtitle.fade-out {
    animation: fadeOut 0.15s ease forwards;
}

.card-subtitle.fade-in {
    animation: fadeIn 0.15s ease forwards;
}

/* Animaciones de entrada */
@keyframes slideDownHeader {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpSection {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clases para animar secciones con scroll */
.section {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Bloque: Tipografía fluida y ajustes móviles */
:root {
    --base-font: clamp(14px, 1.2vw + 12px, 18px);
}
html { font-size: var(--base-font); }
body { font-size: 1rem; line-height: 1.45; }

/* Titulares fluidos manteniendo jerarquía */
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.05; }
h2 { font-size: clamp(1.3rem, 4vw, 2.2rem); line-height: 1.15; }
h3 { font-size: clamp(1rem, 3vw, 1.25rem); }
p { font-size: 1rem; }

/* Ajustes por componente para móviles */
.card { font-size: 0.95rem; }
.featured-work { font-size: 0.95rem; }

/* Breakpoint tablet / móviles grandes */
@media (max-width: 900px) {
    :root { --base-font: clamp(13px, 1.1vw + 11px, 16px); }
    h1 { font-size: clamp(1.9rem, 7.5vw, 3.6rem); }
    h2 { font-size: clamp(1.15rem, 4.5vw, 1.9rem); }
    p  { font-size: 0.9rem; }
    .card { font-size: 0.96rem; }
}

/* Ajustes extra para móviles muy pequeños */
@media (max-width: 480px) {
    :root { --base-font: clamp(16px, 2.75vw, 19px); }
    h1 { font-size: clamp(1.6rem, 9vw, 2.8rem); }
    h2 { font-size: clamp(1rem, 5vw, 1.6rem); }
    p  { font-size: 1.19rem; line-height: 1.7; }
    .card { font-size: 1.13rem; }
    
    /* Excluir header del aumento */
    header {
        --base-font: clamp(13px, 2.2vw, 15px);
    }
    header p { font-size: 0.95rem; line-height: 1.35; }
}
/* Bloque responsive para celular/tablet — pegar en css/style.css */

/* Breakpoint principal para tablet y móviles grandes */
@media (max-width: 900px) {
  /* Topbar: logo más pequeño y menu móvil */
  .topbar {
    height: 64px;
    padding: 0 12px;
  }
  .topbar-logo {
    height: 40px;
    width: auto;
  }
  .topbar-menu-button {
    display: inline-flex;
  }
  .topbar-links {
    display: none;
  }
  .topbar-link {
    font-size: 0.95rem;
    padding: 6px 8px;
    white-space: nowrap;
  }

  /* Header: avatar encima, contenido centrado */
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    grid-template-columns: none;
    padding-bottom: 20px;
    text-align: center;
  }
  .avatar {
    order: 0;
    width: 220px;
    height: 220px;
    border-radius: 20px;
    margin: 0 auto;
  }
  .header-content {
    order: 1;
    text-align: center;
    max-width: 680px;
  }
  .teammates-header {
    order: 2;
    align-items: center;
    margin-top: 12px;
  }
  .teammates-list {
    justify-content: center;
  }

  /* Carousel de materias: tarjetas fluidas que ocupan la mayor parte del ancho */
  .carousel-grid {
    display: flex;
    gap: 12px;
    width: auto;
    padding: 0 12px;
    scroll-snap-type: x mandatory;
  }
  .card {
    flex: 10% 20% 80%;
    min-width: 350px;
    max-width: 800px;
    width: auto;
    height: auto;
    min-height: 180px;
    padding: 10px;
    scroll-snap-align: start;
  }
  .card-title { font-size: 1.25rem; }

  /* Featured work: reducir altura en pantallas pequeñas */
  .featured-work {
    height: 360px;
    min-height: 300px;
  }
  .featured-work img { max-height: 100%; }

  /* Ajustes generales táctiles y espaciado */
  .contact-link img { width: 48px; height: 48px; }
  .section { padding: 24px; }
  .page { padding: 24px 16px 56px; }
}

/* Ajustes extra para móviles muy pequeños */
@media (max-width: 480px) {
  .topbar-logo { height: 34px; }
  .avatar { width: 180px; height: 180px; }
  .card { width: auto !important; flex: 0 0 calc(100% - 32px); }
  .card-title { font-size: 1.56rem; }
  .card-subtitle { font-size: 1.15rem; }
  .card li { font-size: 1.09rem; line-height: 1.2; margin-bottom: 18px; }
  .featured-work { height: 300px; min-height: 260px; }
  header h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
}