:root {
    --accent-primary: #818CF8;
    --accent-secondary: #20C997;
    --text: #FFFFFF;
    --text-light: #AAB8C8;
    --bg: #121212;
    --card-bg: #1A1A1A;
    --border-color: #4A5568;
    --primary: #7E253D;
    --secondary: #4A6BAA;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
}

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

section {
    margin-bottom: 1rem;
    padding: 2rem 0;
}

h1, h2 { color: var(--accent-primary); }
h3 { color: var(--accent-primary); }
h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5rem 2rem 3rem;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.header-content {
    text-align: left;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding-top: 3rem;
    }
    .header-content {
        text-align: center;
        order: 2;
    }
    .profile-photo {
        order: 1;
        margin-bottom: 2rem;
    }
    .social-links {
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }
}

.header-content .main-roles { 
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-secondary); 
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

/* Update p tags to use the new classes (optional, but cleaner) */
.header-content .location,
.header-content .specialization {
    font-size: 1rem;
    color: var(--text-faded, #8C95A8);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

header h1 { font-size: 2.8rem; margin-bottom: 0.5rem; font-weight: 700; }

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.2);
    flex-shrink: 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0;
    flex-shrink: 0;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.6rem;
    text-decoration: none;
    transition: color 0.3s;
}
.social-links a:hover { color: var(--accent-primary); }

.timeline-item, .project-card, .education-item, .skill-group {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.timeline-item:hover, .project-card:hover, .education-item:hover, .skill-group:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.timeline-header { display: block; margin-bottom: 0.75rem; }

.role {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.company-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    min-height: 40px;
}
.company-logo { height: 30px; margin-right: 10px; }
.logo-hellenic-staff { height: 40px; }
.logo-ppc { height: 25px; filter: invert(1);}
.logo-ntua { height: 35px; filter: invert(1); }
.logo-epfl { height: 20px; }
.logo-acg { height: 35px; }

.company { color: var(--text-light); font-weight: 600; }
.date { color: var(--text-light); font-size: 0.9rem; margin-top: 5px; text-align: center;}

.tech-stack {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.tag {
    background: rgba(32, 201, 151, 0.1);
    color: var(--accent-secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(32, 201, 151, 0.2);
}

.skill-carousel-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #9f9f9f #2c2c2c; /* thumb | track */
}

.skill-carousel-scroll::-webkit-scrollbar {
    height: 10px; /* horizontal scrollbar height */
}

.skill-group {
    min-width: 320px;
    max-width: 350px;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-align: center;
}

.section-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding-top: 3rem;
    }

    .profile-photo {
        order: 1;
        margin-bottom: 2rem;
    }

    .header-content {
        text-align: center;
        order: 2;
    }

    .social-links {
        order: 3;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

     .section-column-grid {
        grid-template-columns: 1fr;
    }

    .photo-tile-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 0 20px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .photo-item, 
    .photo-horizontal-double {
        width: 85% !important;
        max-width: 400px !important;
        height: auto !important;
        aspect-ratio: 1.5 !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        grid-column: span 1 !important;
    }
    
    .photo-horizontal-double {
        aspect-ratio: 2 !important;
    }
    
    .full-width-gallery-section {
        width: 100% !important;
        left: 0 !important;
        margin-left: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

}

.full-width-gallery-section {
    width: 95vw;
    position: relative;
    left: 50%;
    margin-left: -47.5vw;
    padding: 0;
    margin-top: 5rem;
    margin-bottom: 3rem;
    overflow: hidden;
}
.photo-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.photo-item {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.2s;
    border-radius: 5px;
}
.photo-item:hover { transform: scale(1.01); }

.photo-horizontal-double { grid-column: span 2; }

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.contact-cta {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--bg);
}

.contact-cta h2 {
    margin-bottom: 1rem;
}

.contact-cta p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-secondary);
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-secondary);
    box-shadow: none;
}

.cta-button:hover {
    background-color: rgba(32, 201, 151, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.languages-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.languages-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.language-card {
    flex: 0 0 calc(33.333% - 14px);
    max-width: 300px;
    box-sizing: border-box;
}

.languages-row-2 .language-card {
    flex: 0 0 calc(50% - 10px);
    max-width: 300px;
}

@media (max-width: 900px) {
    .languages-row,
    .languages-row-2 {
        justify-content: center;
    }
    .language-card,
    .languages-row-2 .language-card {
        flex: 0 0 100%;
        max-width: 300px;
    }
}

.language-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.language-flag {
    width: 80px;
    height: 50px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.language-flag .fi {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}

.language-details {
    flex: 1;
}

.language-name {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.language-level {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.language-progress {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .languages-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}