:root {
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-muted: #95a5a6;
    --accent: #3498db;
    --accent-light: #d6eaf8;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
    --tag-bg: rgba(255,255,255,.12);
    --tag-tech-bg: #eaf4fd;
    --tag-tech-color: #2980b9;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    background: #f0f2f5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.cv-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 960px;
    margin: 32px auto;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    min-height: 100vh;
}

/* ── Sidebar ── */
.cv-sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 32px 24px;
}

.sidebar-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1.2;
}

.sidebar-header .title {
    margin-top: 6px;
    font-size: .85rem;
    color: var(--accent);
    font-weight: 500;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h2 {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sidebar-muted);
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* Contact */
.contact-list { list-style: none; }
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 7px;
    font-size: .82rem;
    word-break: break-all;
}
.contact-list .icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: var(--accent);
    font-style: normal;
    font-size: .9rem;
}
.contact-list a { color: var(--sidebar-text); opacity: .85; }
.contact-list a:hover { opacity: 1; }

/* Skills */
.skill-group { margin-bottom: 12px; }
.skill-group h3 {
    font-size: .75rem;
    font-weight: 600;
    color: var(--sidebar-muted);
    margin-bottom: 5px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .75rem;
    background: var(--tag-bg);
    color: var(--sidebar-text);
    border: 1px solid rgba(255,255,255,.15);
}

/* Languages */
.lang-list { list-style: none; }
.lang-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: .82rem;
}
.lang-name { font-weight: 600; }
.lang-level {
    font-size: .75rem;
    color: var(--sidebar-muted);
}

/* Interests */
.interest-list { list-style: none; }
.interest-list li {
    font-size: .82rem;
    padding: 2px 0;
    color: var(--sidebar-text);
    opacity: .85;
}
.interest-list li::before {
    content: '▸ ';
    color: var(--accent);
    font-size: .7rem;
}

/* ── Main content ── */
.cv-main {
    background: #fff;
    padding: 36px 40px;
}

.main-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--accent-light);
}

/* Summary */
.summary {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.7;
}

/* Experience */
.experience-item,
.education-item {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.experience-item:last-child,
.education-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.exp-position {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
}

.exp-company {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.exp-period {
    flex-shrink: 0;
    font-size: .75rem;
    color: var(--accent);
    font-weight: 600;
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.task-list {
    list-style: none;
    margin: 8px 0;
}
.task-list li {
    font-size: .83rem;
    color: var(--text-muted);
    padding: 2px 0 2px 14px;
    position: relative;
}
.task-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.tag--tech {
    background: var(--tag-tech-bg);
    color: var(--tag-tech-color);
    border: 1px solid #aed6f1;
    font-size: .72rem;
    padding: 2px 7px;
    border-radius: 4px;
}

/* Skills grid in main */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 24px;
}

.skill-group-main h3 {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Print ── */
@media print {
    body { background: #fff; }
    .cv-wrapper {
        margin: 0;
        box-shadow: none;
        max-width: 100%;
    }
}

/* ── Responsive ── */
@media (max-width: 680px) {
    .cv-wrapper {
        grid-template-columns: 1fr;
        margin: 0;
    }
    .cv-sidebar {
        padding: 24px 20px;
    }
    .cv-main {
        padding: 24px 20px;
    }
}
