/* About Section Bento Grid Redesign */
.about-section {
    padding: 1rem 2% 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2rem;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-white);
    letter-spacing: -1px;
}

/* Main Grid Container */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Common Card Styles */
.bento-item {
    background: rgba(20, 20, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle border */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 28, 135, 0.5);
    box-shadow: 0 15px 35px rgba(88, 28, 135, 0.25);
    background: rgba(30, 30, 35, 0.8);
}

/* Decorative Glow on Hover */
.bento-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(88, 28, 135, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.bento-item:hover::after {
    opacity: 1;
}

/* Headers inside cards */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h3 {
    font-size: 1.25rem;
    color: var(--text-white);
    font-weight: 600;
    margin: 0;
}

.icon-glow {
    color: #ef3893;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(239, 56, 147, 0.5));
}

/* ----------------------------------------------------
   Specific Card Styles 
---------------------------------------------------- */

/* 1. Photo Card (Row 1, Col 1) */
.photo-card {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(20,20,20,0.8) 100%);
}

.img-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #ef3893, #aa36f3);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(239, 56, 147, 0.3);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain, depending on image */
    border-radius: 50%;
    border: 4px solid #1a1a1a;
    background-color: #000;
}

.photo-details h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.25rem;
}

.photo-details p {
    color: #ef3893;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.social-mini {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-mini a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.social-mini a:hover {
    background: #ef3893;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(239, 56, 147, 0.4);
}

/* 2. Summary Card (Row 1, Span 2) */
.summary-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
}

.summary-text {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.summary-text strong {
    color: #ffffff;
    font-weight: 600;
}

.location-badge {
    margin-top: auto; /* Push to bottom */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-gray);
    width: fit-content;
}

.location-badge i {
    color: #ef3893;
}

/* 3. Stats Card (Row 2, Span 1) */
.stats-card {
    grid-column: span 1;
    padding: 0; /* Removing padding to let grid fill */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible; /* Allow hover effects to spill */
}

.stat-grid-internal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 100%;
}

.stat-item-box {
    background: rgba(20, 20, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-item-box:hover {
    background: rgba(239, 56, 147, 0.15);
    border-color: #ef3893;
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.stat-icon {
    font-size: 2rem;
    color: #ef3893;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 4. Education Card (Row 2, Span 2) */
.edu-card {
    grid-column: span 2;
}

.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-entry {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

/* Connecting Line */
.timeline-element:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 25px;
    bottom: -20px;
    width: 2px;
    background: rgba(239, 56, 147, 0.3);
}

.time-marker {
    width: 16px;
    height: 16px;
    background: #ef3893;
    border-radius: 50%;
    margin-top: 5px; /* Align with first text line */
    box-shadow: 0 0 0 4px rgba(239, 56, 147, 0.2);
    flex-shrink: 0;
}

.entry-content h4 {
    color: var(--text-white);
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.entry-content .date {
    font-size: 0.8rem;
    color: #ef3893;
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: block;
    text-transform: uppercase;
}

.entry-content .institution {
    color: var(--text-gray);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.entry-content .detail {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 5. Papers Card (Row 3, Span 2) -> Let's make it Span 3 for balance visually? 
   Or Keep at 2 and put something else in space 1?
   Let's try making Papers Span 3 for better readability.
*/
.papers-card {
    grid-column: span 3; 
}

.papers-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.paper-row {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background 0.2s;
}

.paper-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.paper-row i {
    color: #ef3893;
    font-size: 1.2rem;
    margin-top: 3px;
}

.paper-row p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* 6. Skills Card (Row 4, Span 3) */
.skills-card {
    grid-column: span 3;
    padding: 2rem 2.5rem;
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.tech-category h4 {
    color: #ef3893;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: default;
}

.tech-tag i {
    color: #ef3893;
    font-size: 1rem;
}

.tech-tag:hover {
    background: rgba(239, 56, 147, 0.15);
    border-color: #ef3893;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 56, 147, 0.2);
}

/* ----------------------------------------------------
   Responsive Adjustments 
---------------------------------------------------- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Columns */
    }
    
    .photo-card { grid-column: span 2; display: flex; flex-direction: row; justify-content: flex-start; text-align: left; padding: 1.5rem; align-items: center; gap: 2rem; }
    .img-wrapper { margin-bottom: 0; width: 100px; height: 100px; }
    .photo-details { text-align: left; }
    .social-mini { justify-content: flex-start; }
    
    .summary-card { grid-column: span 2; }
    .stats-card { grid-column: span 2; }
    .edu-card { grid-column: span 2; }
    .papers-card { grid-column: span 2; }
    .skills-card { grid-column: span 2; }
    
    .stat-grid-internal {
        grid-template-columns: repeat(4, 1fr); /* Horizontal stats on tablet */
        grid-template-rows: 1fr;
    }
    
    .tech-stack-grid {
        grid-template-columns: 1fr; /* Stack categories on tablet/mobile */
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        display: flex;
        flex-direction: column; /* Stack everything */
        gap: 1.5rem;
    }
    
    .photo-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .photo-details { text-align: center; }
    .social-mini { justify-content: center; }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .stat-grid-internal {
        grid-template-columns: 1fr 1fr; /* 2x2 on mobile */
        grid-template-rows: 1fr 1fr;
    }
    
    .papers-list {
        grid-template-columns: 1fr; /* Single column papers */
    }

    .tech-stack-grid {
        grid-template-columns: 1fr;
    }
}