/**
 * Page-specific Styles
 */

/* Hero Content */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        display: none;
    }

    #about-name {
        display: none;
    }

    .hero-image {
        order: -1;
    }
    
    .hero-image img {
        width: 200px;
        height: 200px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
}

/* Page Header */
.page-header {
    padding-top: calc(80px + 1.5rem); /* navbar + poco spazio */
    padding-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--bg-secondary) 100%);
    text-align: center;
    position: relative;
    min-height: 220px; /* leggermente più basso */
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header .container {
    position: relative;
    z-index: 1;
    padding-bottom: 1rem; /* Compensa il gradient in basso */
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Hero Section (shared wrapper) */
.hero {
    padding: 5rem 0 3rem;
    min-height: 0;
}

/* Option B — accent bar hero */
.hero-b {
    background: var(--bg-secondary);
    padding: 5rem 0 3.5rem;
}

.hero-b-card {
    display: flex;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.hero-b-accent {
    width: 5px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-b-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 2.5rem;
    flex: 1;
}

.hero-b-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-hover);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.hero-b-text {
    flex: 1;
}

.hero-b-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.hero-b-role {
    font-size: 0.9375rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.hero-b-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    max-width: 65ch;
}

.hero-b-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-b-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.75rem;
    }
    .hero-b-name { font-size: 1.5rem; }
}

/* 6-card grid: 3 columns × 2 rows, strictly capped */
.featured-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.featured-grid-6 .featured-card:nth-child(n+7) {
    display: none;
}

@media (max-width: 1024px) {
    .featured-grid-6 { grid-template-columns: repeat(2, 1fr); }
    .featured-grid-6 .featured-card:nth-child(n+7) { display: none; }
}

@media (max-width: 640px) {
    .featured-grid-6 { grid-template-columns: 1fr; }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    padding: var(--space-2xl) 0;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Bio Section */
.bio-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Bio con immagine float a destra */
.bio-section.bio-with-image {
    text-align: left;
    max-width: 900px;
}

.bio-section.bio-with-image h2 {
    text-align: left;
}

.bio-image-float {
    float: right;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 0 0 1.5rem 2rem;
    border: 4px solid var(--accent);
    object-fit: cover;
    shape-outside: circle(50%);
}

@media (max-width: 640px) {
    .bio-section.bio-with-image {
        text-align: center;
    }
    
    .bio-section.bio-with-image h2 {
        text-align: center;
    }
    
    .bio-image-float {
        float: none;
        display: block;
        margin: 0 auto 2rem auto;
    }
}

.bio-section img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 2rem;
    border: 4px solid var(--accent);
    object-fit: cover;
}

.bio-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.bio-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.bio-text:last-child {
    margin-bottom: 0;
}

/* Fix bio-text alignment in the bio-with-image layout so it aligns with the heading.
   Overrides the global max-width: 68ch + margin: auto centering from base.css
   which would otherwise offset the paragraph from the left-aligned h2 heading. */
.bio-section.bio-with-image .bio-text {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Section titles for journey page - align with the 800px timeline */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    max-width: 800px;
    margin: 0 auto;
    letter-spacing: -0.02em;
}

/* Contact Cards */
.contact-card {
    text-align: center;
    text-decoration: none;
    display: block;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.contact-card p {
    color: var(--accent);
    font-weight: 600;
}

/* Location Box */
.location-box {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 600px; /* Stessa larghezza della grid-2 */
    margin-left: auto;
    margin-right: auto;
}

.location-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.location-box p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Resources Page */
.resources-section .project-grid {
    margin-top: 0;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
}


/* Hero title consistent with subtitle */
.hero-title {
    letter-spacing: -0.02em;
}

.hero-subtitle {
    letter-spacing: -0.01em;
}

.hero-description {
    color: rgba(51, 65, 85, 0.95);
}

/* Page header: more modern gradient + subtle radial highlights */
.page-header {
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(59, 130, 246, 0.35), transparent 60%),
        radial-gradient(900px 420px at 85% 20%, rgba(16, 185, 129, 0.07), transparent 60%),
        linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 55%, var(--bg-secondary) 120%);
}

/* CTA: a little more depth */
.cta-section {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
