:root {
    /* Colores */
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f5f5f5;
    --subtext-color: #a0a0a0;
    --badge-bg: #ffffff;
    --badge-text: #000000;
    --hover-bg: rgba(255, 255, 255, 0.05);

    /* Estados Académicos */
    --status-approved-bg: rgba(46, 125, 50, 0.2);
    --status-approved-text: #81c784;
    --status-approved-border: rgba(129, 199, 132, 0.3);

    --status-ongoing-bg: rgba(33, 150, 243, 0.15);
    --status-ongoing-text: #64b5f6;
    --status-ongoing-border: rgba(100, 181, 246, 0.3);

    --status-pending-bg: rgba(255, 152, 0, 0.15);
    --status-pending-text: #ffb74d;
    --status-pending-border: rgba(255, 183, 77, 0.3);

    /* Propiedades de Borde */
    --border-width: 1px;
    --border-style: solid;
    --border-color: #333333;

    /* Border Radius */
    --border-radius-card: 8px;
    --border-radius-btn: 20px;
    --border-radius-badge: 4px;
    --border-radius-avatar: 50%;

    /* Tipografía y Espaciados */
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --transition-standard: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    position: relative;
    width: 100%;
    max-width: 680px;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius-card);
    border-width: var(--border-width);
    border-style: var(--border-style);
    border-color: var(--border-color);
}

/* Botón Volver */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--subtext-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-btn);
    border-width: var(--border-width);
    border-style: var(--border-style);
    border-color: var(--border-color);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-standard);
}

.back-btn:hover {
    color: var(--text-color);
    border-color: var(--subtext-color);
    background-color: var(--hover-bg);
}

.back-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Header con Avatar y Texto Alineados */
header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    margin-bottom: 24px;
    border-bottom-width: var(--border-width);
    border-bottom-style: var(--border-style);
    border-bottom-color: var(--border-color);
    padding-bottom: 24px;
}

.avatar-img {
    width: 112px;
    height: 112px;
    border-radius: var(--border-radius-avatar);
    object-fit: cover;
    border-width: var(--border-width);
    border-style: var(--border-style);
    border-color: var(--border-color);
    flex-shrink: 0;
}

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

.user-name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.meta-info {
    font-size: 0.8rem;
    color: var(--subtext-color);
    line-height: 1.4;
}

main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--subtext-color);
    font-weight: 600;
}

.info-card {
    background-color: rgba(255, 255, 255, 0.02);
    border-width: var(--border-width);
    border-style: var(--border-style);
    border-color: var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--subtext-color);
}

.info-card strong {
    color: var(--text-color);
}

/* Listas e Integrantes */
.item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom-width: var(--border-width);
    border-bottom-style: var(--border-style);
    border-bottom-color: var(--border-color);
}

.list-item:last-child {
    border-bottom: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-avatar);
    object-fit: cover;
    flex-shrink: 0;
}

.item-title {
    font-size: 1rem;
    font-weight: 400;
}

.item-link {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-standard);
}

.item-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--border-radius-badge);
    letter-spacing: 0.05em;
    background-color: var(--badge-bg);
    color: var(--badge-text);
}

/* Estado de Materias */
.status-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--border-radius-badge);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.status-approved {
    background-color: var(--status-approved-bg);
    color: var(--status-approved-text);
    border: 1px solid var(--status-approved-border);
}

.status-ongoing {
    background-color: var(--status-ongoing-bg);
    color: var(--status-ongoing-text);
    border: 1px solid var(--status-ongoing-border);
}

.status-pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending-text);
    border: 1px solid var(--status-pending-border);
}

/* Desplegables de Foja Académica */
details {
    border-bottom-width: var(--border-width);
    border-bottom-style: var(--border-style);
    border-bottom-color: var(--border-color);
    padding: 10px 0;
}

details:last-child {
    border-bottom: none;
}

summary {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    padding: 4px 0;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-size: 1.1rem;
    color: var(--subtext-color);
    transition: transform 0.2s ease;
}

details[open] summary::after {
    content: "−";
}

.subject-list {
    list-style: none;
    margin-top: 10px;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subject-item {
    font-size: 0.85rem;
    color: var(--subtext-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top-width: var(--border-width);
    border-top-style: var(--border-style);
    border-top-color: var(--border-color);
    font-size: 0.75rem;
    color: var(--subtext-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-link {
    color: var(--subtext-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-standard);
}

.footer-link:hover {
    color: var(--text-color);
}

.external-icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.legal-notice {
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--subtext-color);
    opacity: 0.7;
}