:root {
    --primary-color: #1e293b;
    --secondary-color: #3b82f6;
    --text-color: #334155;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Αναβαθμισμένο Header Section */
header {
    background: var(--primary-color);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

header .subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

header .b-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    /* text-transform: uppercase; */
    letter-spacing: 1px;
    font-weight: 600;
}

/* Styling για τη Φωτογραφία Προφίλ */
.profile-img-container {
    flex-shrink: 0;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(59, 130, 246, 0.5);
    /* Διακριτικό μπλε border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: block;
}

.contact-info {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
    gap: 15px;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    font-size: 0.95rem;
    width: 100%;
    justify-content: space-around;
    grid-auto-flow: column;
    align-content: space-between;
}

.contact-info a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: #93c5fd;
}

/* Responsive συμπεριφορά για το Header σε κινητά */
@media (max-width: 650px) {
    .header-content {
        flex-direction: column-reverse;
        /* Η φωτογραφία πάει πάνω σε μικρές οθόνες */
        text-align: center;
        gap: 20px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        text-align: center;
        grid-auto-flow: row;
    }
}

/* Main Content Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* Job & Education Items */
.item {
    margin-bottom: 25px;
}

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

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .item-header {
        flex-direction: column;
        gap: 5px;
    }
}

.item-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.company {
    color: var(--secondary-color);
    font-weight: 600;
}

.date {
    background: #e2e8f0;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

ul {
    list-style-type: none;
}

ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

ul li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Seminars Table */
.seminar-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.seminar-year {
    font-weight: bold;
    color: var(--secondary-color);
}

/* Skills Tags Styling */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #eff6ff;
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
}

@media print {
    @page {
        size: A4;
        margin: 15mm 12mm;
    }

    body {
        background-color: #ffffff;
        color: #1e293b;
        font-size: 9.5pt;
    }

    .container {
        padding: 0;
        max-width: 100%;
    }

    header {
        background: transparent !important;
        color: #1e293b !important;
        padding: 0 0 15px 0;
        border-radius: 0;
        margin-bottom: 20px;
        border-bottom: 2px solid #1e293b;
        box-shadow: none;
    }

    .header-content {
        display: block;
        /* Απλό block για σωστό print */
        position: relative;
        width: 100%;
    }

    .header-text {
        display: block;
        width: 80%;
    }

    .profile-img-container {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        width: 100px;
    }

    header h1 {
        color: #1e293b !important;
        font-size: 22pt;
    }

    header .subtitle {
        color: #3b82f6 !important;
        font-size: 11pt;
        margin-bottom: 10px;
    }

    .contact-info {
        border-top: 1px solid #cbd5e1;
        display: block;
        /* Μετατροπή από grid σε απλά blocks */
        margin-top: 10px;
        padding-top: 10px;
    }

    .contact-info div {
        display: inline-block;
        width: 48%;
        margin-bottom: 4px;
    }

    .contact-info a {
        color: #1e293b !important;
        text-decoration: underline;
    }

    .profile-img {
        border: 2px solid #3b82f6;
        width: 90px;
        height: 90px;
    }

    /* Καταργούμε το Grid/Table που δημιουργούσε τη λευκή σελίδα */
    .main-layout {
        display: block;
        width: 100%;
    }

    main,
    aside {
        display: block;
        width: 100%;
        padding: 0;
    }

    section {
        background: transparent !important;
        padding: 0;
        margin-bottom: 20px;
        box-shadow: none;
        /* Επιτρέπουμε στο περιεχόμενο να αλλάζει σελίδα ομαλά */
        page-break-inside: auto;
    }

    /* Αποτρέπουμε να μένει ο τίτλος μόνος του στο τέλος της σελίδας */
    h2 {
        color: #1e293b !important;
        font-size: 13pt;
        border-bottom: 2px solid #1e293b;
        margin-bottom: 10px;
        page-break-after: avoid;
    }

    /* Κάθε μεμονωμένη εμπειρία να μην σπάει στη μέση αν είναι εφικτό */
    .item,
    .seminar-item {
        page-break-inside: avoid;
        margin-bottom: 15px;
    }

    .item-header {
        display: block;
        position: relative;
    }

    .item-header div {
        width: 75%;
        display: inline-block;
    }

    .item-header .date {
        position: absolute;
        right: 0;
        top: 0;
        background: transparent !important;
        border: 1px solid #cbd5e1;
        color: #334155 !important;
        padding: 1px 6px;
        display: inline-block;
    }

    .skills-container {
        display: block;
    }

    .skill-tag {
        display: inline-block;
        background: transparent !important;
        color: #1e293b !important;
        border: 1px solid #cbd5e1 !important;
        padding: 2px 6px;
        margin-right: 4px;
        margin-bottom: 4px;
    }

    .seminar-item {
        display: block;
    }

    .seminar-year {
        display: inline-block;
        width: 50px;
        color: #3b82f6 !important;
    }

    .seminar-item div:last-child {
        display: inline-block;
        width: calc(100% - 60px);
        vertical-align: top;
    }

    #lang-toggle-btn {
        display: none;
    }

    #chat-widget-container {
        display: none;
    }
}
