/* Asettelu ja värit */
:root {
    --primary-green: #015E38;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-sidebar: #EEEEEE;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #EFEFEF;
    display: flex;
    justify-content: center;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.cv-container {
    width: 210mm;
    min-height: 297mm; /* A4 */
    background-color: var(--white);
    display: flex;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Vasen sivupalkki (Vihreä) */
.sidebar {
    background-color: var(--primary-green);
    color: var(--white);
    width: 32%;
    padding: 30px 20px;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.sidebar h2:first-of-type {
    margin-top: 0;
}

.sidebar p, .sidebar li {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-sidebar);
    margin-bottom: 10px;
}

.contact-info div {
    margin-bottom: 10px;
    word-wrap: break-word;
}

.contact-info strong {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

ul.sidebar-list {
    list-style-type: none;
    padding: 0;
}

ul.sidebar-list li {
    margin-bottom: 8px;
}

/* Oikea sisältöalue (Valkoinen) */
.main-content {
    width: 68%;
    padding: 40px;
    color: var(--text-dark);
}

/* Header with photo layout */
.header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.photo-placeholder {
    width: 100px;
    height: 100px;
    background-color: #ddd;
    /* POISTETTU border-radius: 50% -> NYT NELIÖ */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
    text-align: center;
    border: 2px solid var(--primary-green);
    object-fit: cover; /* Jos kuva lisätään myöhemmin */
}

.header-text h1 {
    margin: 0;
    font-size: 32px;
    color: var(--primary-green);
    line-height: 1.2;
}

.header-text .title {
    font-size: 18px;
    color: #555;
    font-weight: 500;
    margin-top: 5px;
}

.intro-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #444;
}

.section-title {
    font-size: 18px;
    color: var(--primary-green);
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.job-item {
    margin-bottom: 25px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.job-title {
    font-weight: bold;
    font-size: 16px;
    color: #222;
}

.company {
    font-weight: normal;
    color: #555;
}

.date {
    font-size: 14px;
    color: var(--primary-green);
    font-weight: 600;
    text-align: right;
}

.job-desc {
    font-size: 14px;
    line-height: 1.5;
}

.job-desc ul {
    padding-left: 18px;
    margin-top: 8px;
}

.job-desc li {
    margin-bottom: 5px;
}

.tech-stack {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

a {
    color: var(--primary-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tulostusasetukset */

/* Print/download button (fixed, unobtrusive) */
.print-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--white);
    color: var(--primary-green);
    border: 1px solid rgba(1,94,56,0.12);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    opacity: 0.95;
    transition: opacity .12s ease, transform .08s ease;
}
.print-button:hover { opacity: 1; transform: translateY(-1px); }
.print-button:active { transform: translateY(0); }

@media print {
    body {
        background-color: white;
    }
    .print-button { display: none !important; }
    .cv-container {
        width: 100%;
        height: auto;
        box-shadow: none;
    }
}
