/* Viewport-responsive styles for academic profile page */

/* Responsive design for device viewport */
@media screen and (max-width: 768px) {
    /* Make main container responsive */
    table[width="100%"] {
        width: 100% !important;
        max-width: 100%;
    }
    
    /* Adjust card-logo width for tablets */
    .card-logo, #card-logo {
        width: 200px !important;
    }
    
    .card-logo img, #card-logo img {
        max-width: 200px;
    }
    
    /* Make content div responsive */
    div[id="card-content"] {
        width: 100% !important;
        max-width: 100%;
    }
}

@media screen and (max-width: 600px) {
    /* Stack layout for mobile - logo on top, content below */
    table[width="100%"] {
        display: block;
    }
    
    tbody[data-type] {
        display: block;
        margin-bottom: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        background-color: #ffffff;
        overflow: hidden;
    }
    
    tbody[data-type] tr {
        display: block;
        margin: 0;
        padding: 0;
    }
    
    tbody[data-type] td {
        display: block;
        width: 100% !important;
        text-align: center;
        border: none;
        background: transparent;
    }
    
    /* Center the logo in stack layout */
    .card-logo, #card-logo {
        width: 100% !important;
        max-width: 250px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .card-logo img, #card-logo img {
        max-width: 250px;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    /* Make content full width */
    div[id="card-content"] {
        width: 100% !important;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    /* Adjust text sizes for mobile */
    papertitle {
        font-size: 16px;
    }
    
    /* Make buttons more touch-friendly */
    .share-button, .youtube-button {
        font-size: 14px;
        margin: 2px;
    }
    
    /* Fix target highlighting for mobile card layout - references styles.css */
    tbody[data-type]:target,
    tbody[data-type]:has(tr:target) {
        /* Use the same target styles from styles.css */
        outline: var(--target-outline);
        box-shadow: var(--target-shadow), 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
        transition: var(--target-transition), transform 0.3s ease;
    }
    
    /* Remove outline from tr to prevent conflicts */
    tbody[data-type] tr:target {
        outline: none;
    }
}