/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #2d2d2d;
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: #6b46c1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== BACK LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    top: 24px;
    left: 24px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    z-index: 100;
}

.back-arrow {
    font-size: 1.1rem;
    line-height: 1;
}

/* ===== CV CONTAINER ===== */
.cv-container {
    max-width: 860px;
    margin: 60px auto 80px;
    padding: 0 16px;
}

/* ===== CARD ===== */
.card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #444;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card > p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.8;
}

/* ===== PROFILE CARD ===== */
.profile-row {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 26px;
}

.cv-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.profile-id h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nickname {
    font-size: 0.78rem;
    font-weight: 500;
    color: #666;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 2px 10px;
}

.subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    margin-top: 4px;
}

/* ===== CONTACT GRID ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
}

.contact-item i {
    color: #6b46c1;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
    min-width: 0;
}

.contact-l {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #999;
}

.contact-v {
    font-size: 0.88rem;
    color: #333;
    white-space: nowrap;
}

.contact-v a {
    color: #333;
}

/* ===== ENTRIES ===== */
.cv-entry {
    margin-bottom: 20px;
}

.cv-entry:last-child {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.entry-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
}

.entry-company {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 2px 10px;
}

.entry-date {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
}

.entry-bullets {
    list-style: none;
    padding-left: 0;
}

.entry-bullets li {
    position: relative;
    padding-left: 16px;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.7;
}

.entry-bullets li::before {
    content: '•';
    position: absolute;
    left: 2px;
    top: 0;
    color: #999;
}

/* ===== PROJECTS LIST ===== */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: #fbfbfb;
    border: 1px solid #ececec;
    border-radius: 8px;
}

.project-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.project-main h3,
.project-main .entry-bullets li {
    overflow-wrap: anywhere;
    word-break: normal;
}

.project-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.project-title-row h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: #1a1a1a;
}

.project-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    background: #fff;
}

.project-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.project-entry .entry-bullets li {
    font-size: 0.88rem;
    margin-bottom: 3px;
    line-height: 1.6;
}

.highlight {
    color: #6b46c1;
    font-weight: 600;
}

/* ===== SKILLS ===== */
.skills-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.skill-col h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    margin-bottom: 12px;
}

.skill-col h3 i {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: #6b46c1;
    flex-shrink: 0;
}

.skill-col ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-col li {
    background: #f0efef;
    border: 1px solid #e0e0e0;
    color: #444;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
}

/* ===== HOBBIES ===== */
.hobby-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hobby-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fbfbfb;
    border: 1px solid #e5e5e5;
    color: #444;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
}

.hobby-list li i {
    font-size: 0.9rem;
    color: #6b46c1;
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
.cv-footer {
    text-align: center;
    padding-top: 8px;
}

.cv-footer p {
    font-size: 0.75rem;
    color: #aaa;
}

/* ===== REVEAL ===== */
.reveal {
    opacity: 1;
    transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .cv-container {
        margin: 32px 0 48px;
        padding: 0 12px;
    }

    .card {
        padding: 22px 18px;
        border-radius: 6px;
    }

    .profile-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .contact-grid {
        padding-top: 18px;
        grid-template-columns: 1fr;
    }

    .skills-group {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-entry {
        gap: 14px;
    }

    .project-thumb {
        width: 130px;
        height: 90px;
    }

    .back-link {
        position: relative;
        top: 0;
        left: 0;
        margin: 16px 0 0;
    }
}

/* ===== PRINT ===== */
@media print {
    body {
        background: #fff;
    }

    .back-link {
        display: none;
    }

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

    .card {
        border-radius: 0;
        border: 1px solid #eee;
        margin-bottom: 12px;
        page-break-inside: avoid;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}