/* ========================================
   CV PAGE SPECIFIC STYLES
   Common styles are in common.css
   ======================================== */

/* Container - CV specific */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 1));
    backdrop-filter: blur(10px);
    position: relative;
    animation: fadeInDown 0.8s ease;
    transition: background 0.3s ease;
}

/* Light Theme - Hero Section */
[data-theme="light"] .hero {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 1));
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 40px;
}

.profile-image-container {
    flex-shrink: 0;
    animation: scaleIn 0.6s ease;
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-initials {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-color), #fb923c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px rgba(248, 97, 6, 0.3);
    border: 4px solid var(--card-bg);
    transition: all 0.3s ease;
}

.profile-initials:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(248, 97, 6, 0.6);
}

.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 20px rgba(248, 97, 6, 0.3);
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(248, 97, 6, 0.6);
}

.profile-info h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: #fff;
}

/* Light Theme - Profile Name */
[data-theme="light"] .profile-info h1 {
    color: #0f172a;
}

.profile-info h2 {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.contact-item-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-email-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.copy-email-btn:hover {
    color: var(--accent-color);
    background: rgba(248, 97, 6, 0.1);
}

.copy-email-btn.copied {
    color: #22c55e;
}

/* Light Theme - Contact Items */
[data-theme="light"] .contact-item {
    color: #475569;
}

.contact-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.contact-item:hover {
    color: var(--accent-color);
}

/* Main Content */
.main-content {
    padding: 60px 0;
}

.grid-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
}

/* Sections */
.section {
    margin-bottom: 50px;
    animation: fadeInUp 0.6s ease backwards;
}

.sidebar .section:nth-child(1) {
    animation-delay: 0.2s;
}

.sidebar .section:nth-child(2) {
    animation-delay: 0.3s;
}

.sidebar .section:nth-child(3) {
    animation-delay: 0.4s;
}

.sidebar .section:nth-child(4) {
    animation-delay: 0.5s;
}

.content-column .section {
    animation-delay: 0.1s;
}

.section h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section h3 i {
    color: var(--accent-color);
}

/* Sidebar Styles */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tag:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(248, 97, 6, 0.2);
}

.skill-tag:active {
    transform: scale(0.95);
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.info-list strong {
    color: var(--text-primary);
}

.timeline-item,
.cert-item {
    margin-bottom: 25px;
}

.timeline-date,
.cert-date {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 4px;
    font-weight: 500;
}

.institution,
.cert-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cert-item h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cert-item h4 a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Main Column Styles */
.about-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.job-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s;
    animation: fadeInUp 0.6s ease backwards;
}

.job-card:nth-child(1) {
    animation-delay: 0.1s;
}

.job-card:nth-child(2) {
    animation-delay: 0.2s;
}

.job-card:nth-child(3) {
    animation-delay: 0.3s;
}

.job-card:nth-child(4) {
    animation-delay: 0.4s;
}

.job-card:nth-child(5) {
    animation-delay: 0.5s;
}

.job-card:nth-child(6) {
    animation-delay: 0.6s;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(248, 97, 6, 0.2);
    border-color: var(--accent-color);
}

.job-card:active {
    transform: scale(0.98);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.job-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.company {
    color: var(--accent-color);
    font-weight: 500;
}

.job-date {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(248, 97, 6, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Light Theme - Job Date */
[data-theme="light"] .job-date {
    background: rgba(248, 97, 6, 0.7);
    color: #fff;
}

.job-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .contact-bar {
        justify-content: center;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-info h1 {
        font-size: 2.5rem;
    }
}

@page {
    size: A4;
    margin: 15mm 12mm;
}

@media print {
    * {
        animation: none !important;
        transition: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 11pt;
        line-height: 1.5;
        orphans: 3;
        widows: 3;
    }

    .hero {
        background: none;
        padding: 20px 0;
        border-bottom: 3px solid #f86106;
    }

    .profile-image-container {
        width: 80px;
        height: 80px;
    }

    .profile-img,
    .profile-initials {
        width: 80px;
        height: 80px;
        border: 2px solid #ccc;
        box-shadow: none;
    }

    .profile-initials {
        font-size: 2rem;
        background: #eee;
        color: #333;
    }

    .profile-info h1 {
        color: black;
        font-size: 2rem;
    }

    .profile-info h2 {
        color: #555;
    }

    .contact-item {
        color: #333;
    }

    .copy-email-btn {
        display: none;
    }

    a.contact-item[href^="https"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #666;
    }

    /* Layout a 2 colonne — sidebar sinistra + content destra */
    .main-content {
        padding: 15px 0;
    }

    .grid-layout {
        grid-template-columns: 65mm 1fr;
        gap: 8mm;
        align-items: start;
    }

    .sidebar {
        background: #f4f4f4;
        padding: 14px;
        border-radius: 4px;
    }

    .section h3 i {
        color: #f86106;
    }

    .section {
        margin-bottom: 15px;
        break-inside: avoid;
    }

    .job-card {
        border-left: 3px solid #f86106;
        padding: 0 0 0 12px;
        margin-bottom: 20px;
        box-shadow: none;
        background: none;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .skill-tag {
        border: 1px solid #ccc;
        color: black;
        background: none;
    }

    .tech-stack span {
        border: 1px solid #ddd;
        color: #555;
        background: none;
    }

    .job-date {
        background: none;
        color: #555;
        padding: 0;
    }

    .footer {
        display: none;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 40px 0;
    }

    .profile-info h1 {
        font-size: 2rem;
    }

    .profile-info h2 {
        font-size: 1.1rem;
    }

    .contact-bar {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .job-card {
        padding: 15px;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .section h3 {
        font-size: 1rem;
    }
}