:root {
    --accent: #2563eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f3f4f6;
    min-height: 100vh;
    padding: 20px 10px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

/* ── Header ── */

.header {
    background: #1a2540;
    color: white;
    padding: 44px 40px 36px;
}

.header h1 {
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header .subtitle {
    font-size: 1em;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-top: 4px;
}

.contact-info {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.88em;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.contact-info a:hover {
    background: rgba(255, 255, 255, 0.28);
}

.header .summary {
    margin-top: 22px;
    font-size: 0.93em;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 820px;
}

/* ── Main layout ── */

.main-content {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.section h2 {
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* ── Skills ── */

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: default;
}

.skill-item:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Shared timeline (Experience + Education) ── */

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-item {
    border-radius: 10px;
    border-left: 3px solid #e5e7eb;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.experience-item {
    padding: 20px 20px 20px 24px;
}

.education-item {
    padding: 16px 20px 16px 24px;
}

.experience-item:hover {
    border-left-color: var(--accent);
    background: #f8faff;
}

.education-item:hover {
    border-left-color: #10b981;
    background: #f8fffb;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.experience-item .item-header {
    margin-bottom: 12px;
}

.item-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.position {
    font-weight: 700;
    font-size: 1em;
    color: var(--text-primary);
}

.industry {
    font-size: 0.88em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.period {
    font-size: 0.82em;
    color: #9ca3af;
    white-space: nowrap;
    padding-top: 2px;
}

.description {
    color: #4b5563;
    font-size: 0.9em;
}

.description ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.description li {
    position: relative;
    padding-left: 16px;
    line-height: 1.55;
}

.description li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ── Projects ── */

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.project-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-live {
    font-size: 0.75em;
    font-weight: 600;
    color: #16a34a;
    letter-spacing: 0.5px;
}

.project-name {
    font-weight: 700;
    font-size: 1em;
    color: var(--accent);
    text-decoration: none;
}

.project-name:hover {
    text-decoration: underline;
}

/* ── Education ── */

.edu-institution {
    font-weight: 700;
    font-size: 0.95em;
    color: var(--text-primary);
}

.edu-degree {
    font-size: 0.88em;
    color: var(--text-secondary);
}

/* ── Animations ── */

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.12s; }
.section:nth-child(3) { animation-delay: 0.19s; }
.section:nth-child(4) { animation-delay: 0.26s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */

@media (max-width: 960px) {
    .container {
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px 8px;
    }

    .header {
        padding: 32px 24px 28px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .main-content {
        padding: 28px 24px;
        gap: 28px;
    }

    .item-header,
    .project-card-header {
        flex-direction: column;
        gap: 4px;
    }

    .period {
        order: -1;
        color: var(--text-secondary);
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
    }

    .header {
        padding: 24px 20px 22px;
    }

    .header h1 {
        font-size: 1.9em;
    }

    .header .subtitle {
        font-size: 0.78em;
        letter-spacing: 2px;
    }

    .header .summary {
        font-size: 0.88em;
    }

    .contact-info {
        gap: 8px;
    }

    .contact-info a {
        font-size: 0.82em;
        padding: 5px 10px;
    }

    .main-content {
        padding: 20px 16px;
        gap: 20px;
    }

    .experience-item,
    .education-item {
        padding: 14px 14px 14px 16px;
    }

    .description {
        font-size: 0.87em;
    }

    .skill-item {
        font-size: 0.82em;
        padding: 4px 11px;
    }
}
