/* 
 * AysimaPOS Modern Author Profile Styles
 * Designed for Google E-E-A-T & User Experience
 * Primary Color: #2563eb (Aysima Blue)
 */

:root {
    --aysima-blue: #2563eb;
    --aysima-dark-blue: #1d4ed8;
    --aysima-accent: #10b981;
    --aysima-light-bg: #f8f9fa;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    /* EXACT gradient from landing pages: primary-600 (#2563eb) to accent-500 (#10b981) */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
}

/* --- Hero Section (Matches Landing Pages) --- */
.author-hero {
    background: var(--gradient-primary);
    min-height: 35vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0 6rem; /* Extra bottom padding for avatar overlap */
    color: white;
}

.author-hero .container {
    max-width: 1280px;
}

.author-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.8;
}

.author-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.author-name {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.author-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.badge-profession {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-role {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: var(--aysima-blue);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.author-short-bio {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Avatar Pop-out --- */
.author-avatar-wrapper {
    position: relative;
    margin-top: -4rem; /* Pull up to overlap hero */
    margin-bottom: 2rem;
    text-align: center;
    z-index: 10;
}

.author-avatar-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    object-fit: cover;
    background: #fff;
}

.author-avatar-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--aysima-blue);
    margin: 0 auto;
}

/* --- Main Content Layout --- */
.author-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.author-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .author-hero {
        min-height: 30vh;
        padding: 3rem 0 5rem;
    }
    
    .author-name {
        font-size: 2rem;
    }
    
    .author-short-bio {
        font-size: 1rem;
    }
    
    .author-grid {
        grid-template-columns: 1fr;
    }
    .author-sidebar {
        order: 2;
    }
    .author-main {
        order: 1;
    }
}

/* --- Cards --- */
.author-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
}

.card-title i {
    color: var(--aysima-blue);
    margin-right: 0.75rem;
}

/* --- Sidebar Elements --- */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.contact-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    color: var(--aysima-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* --- Social Media Grid --- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.social-grid-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #fff;
}

.social-grid-item i {
    font-size: 1rem;
}

.social-grid-item span {
    white-space: nowrap;
}

.social-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #fff;
}

/* Social Brand Colors */
.social-grid-item.linkedin {
    background: #0077b5;
}

.social-grid-item.twitter {
    background: #1da1f2;
}

.social-grid-item.github {
    background: #333;
}

.social-grid-item.youtube {
    background: #ff0000;
}

.social-grid-item.medium {
    background: #00ab6c;
}

/* --- Experience Badge --- */
.experience-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-years {
    font-size: 2rem;
    font-weight: 800;
    color: var(--aysima-blue);
    line-height: 1;
}

.experience-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.experience-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: #f3f4f6;
    color: var(--text-dark);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Timeline (Education & Experience) --- */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.95rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid var(--aysima-blue);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.1rem;
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Main Content Elements --- */
.bio-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #374151;
}

.bio-text p {
    margin-bottom: 1rem;
}

/* Paragraph spacing for nl2br rendered text */
.bio-text br + br {
    display: block;
    content: "";
    margin-top: 0.5rem;
}

.award-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.award-item {
    display: flex;
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 1rem;
    border-radius: 8px;
}

.award-icon {
    font-size: 1.5rem;
    color: #d97706;
    margin-right: 1rem;
}

/* --- Blog Grid (Related Posts Style) --- */
.author-posts-section .related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.author-posts-section .related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.author-posts-section .related-post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    background-color: #f8fafc;
}

.author-posts-section .related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.author-posts-section .related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.author-posts-section .related-post-content {
    padding: 1.25rem;
}

.author-posts-section .related-post-category {
    font-size: 0.75rem;
    color: var(--aysima-blue);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.author-posts-section .related-post-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.author-posts-section .related-post-title a {
    color: var(--text-dark, #1f2937);
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-posts-section .related-post-title a:hover {
    color: var(--aysima-blue);
}

.author-posts-section .related-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.author-posts-section .related-post-meta i {
    margin-right: 0.25rem;
}

/* Legacy post-card styles (can be removed if not used elsewhere) */
.post-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.post-image {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.post-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    font-size: 0.75rem;
    color: var(--aysima-blue);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* --- Sidebar Awards --- */
.award-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.award-item-sidebar {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fffbeb;
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

.award-item-sidebar i {
    font-size: 1rem;
    margin-top: 0.1rem;
}

/* --- Full Width Blog Posts Section --- */
.author-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.section-title-full {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title-full i {
    color: var(--aysima-blue);
}

.author-posts-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .author-posts-grid-full {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .author-posts-grid-full {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .author-hero {
        min-height: auto;
        padding: 2.5rem 0 4rem;
    }
    
    .author-name {
        font-size: 1.75rem;
    }
    
    .author-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .badge-profession,
    .badge-role {
        font-size: 0.85rem;
    }
    
    .author-short-bio {
        font-size: 0.95rem;
    }
    
    .author-avatar-img,
    .author-avatar-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .author-posts-grid-full {
        grid-template-columns: 1fr;
    }
}

/* --- Author Bio Content (EditorJS Rendered) --- */
.author-bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.author-bio-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--aysima-blue);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.author-bio-content h2:first-child {
    margin-top: 0;
}

.author-bio-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem 0;
}

.author-bio-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.25rem 0 0.5rem 0;
}

.author-bio-content p {
    margin-bottom: 1rem;
}

.author-bio-content ul,
.author-bio-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.author-bio-content li {
    margin-bottom: 0.5rem;
}

.author-bio-content blockquote {
    border-left: 4px solid var(--aysima-blue);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--aysima-light-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.author-bio-content blockquote p {
    margin-bottom: 0;
}

.author-bio-content blockquote footer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: normal;
}

.author-bio-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.author-bio-content a {
    color: var(--aysima-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.author-bio-content a:hover {
    border-bottom-color: var(--aysima-blue);
}

.author-bio-content hr {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 2rem 0;
}

.author-bio-content figure {
    margin: 1.5rem 0;
    text-align: center;
}

.author-bio-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.author-bio-content figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.author-bio-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.author-bio-content code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}
