:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.15);
    --accent-hover: #4338ca;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-focus: #cbd5e1;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    background-color: var(--bg-page);
    font-family: var(--font-sans);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Resume A4 Container */
.resume-wrapper {
    background-color: var(--bg-card);
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    padding: 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Accent top bar */
.accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--accent) 0%, #06b6d4 100%);
}

/* Header styling */
.resume-header {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 35px;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-frame {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
    z-index: 2;
}

.frame-border {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--accent);
    border-radius: 28px;
    opacity: 0.3;
    z-index: 1;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.name {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.title-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-page);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 550;
    color: var(--primary-light);
    width: fit-content;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-contact {
    display: flex;
    justify-content: flex-end;
}

.contact-card {
    background-color: var(--bg-page);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    border: 1px solid var(--border);
}

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

.contact-item .icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-details .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.contact-details .value {
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-details a.value:hover {
    color: var(--accent);
}

/* Resume Body */
.resume-body {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 45px;
    flex: 1;
}

/* Section Title global style */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title .title-num {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent);
    font-weight: 600;
}

.section-title .title-text {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    white-space: nowrap;
}

.section-title .title-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--border);
}

.resume-section {
    margin-bottom: 35px;
}

/* Profile summary text */
.summary-paragraph {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
    text-align: justify;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 3px solid var(--accent);
    transition: background-color 0.2s;
}

.timeline-item:hover .timeline-marker {
    background-color: var(--accent);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 4px;
}

.timeline-header .role {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.timeline-header .period {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background-color: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 8px;
}

.timeline-item .company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.timeline-item .company .location {
    font-weight: 400;
    font-size: 0.85rem;
}

.achievements {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.achievements li {
    font-size: 0.88rem;
    color: var(--text-main);
    position: relative;
    padding-left: 15px;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.project-card {
    background-color: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.project-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.project-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Sidebar Column */
.skills-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skills-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-light);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--bg-page);
    border: 1px solid var(--border);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 550;
    padding: 6px 14px;
    border-radius: 10px;
    transition: all 0.2s;
}

.tag:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Education items styling */
.education-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.edu-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edu-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.edu-degree {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.edu-school {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.edu-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Languages List */
.languages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-page);
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.lang-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.lang-level {
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--accent);
}

/* Media Queries for Screens */
@media (max-width: 1024px) {
    body {
        padding: 20px 0;
    }
    .resume-wrapper {
        width: 100%;
        max-width: 900px;
        min-height: auto;
        padding: 40px;
        border-radius: 16px;
    }
}

@media (max-width: 768px) {
    .resume-header {
        grid-template-columns: 1fr;
        gap: 25px;
        padding-bottom: 25px;
    }
    
    .header-contact {
        justify-content: flex-start;
    }

    .contact-card {
        max-width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .resume-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 500px) {
    .contact-card {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styling */
@media print {
    body {
        background-color: white;
        padding: 0;
        margin: 0;
    }
    .resume-wrapper {
        box-shadow: none;
        padding: 40px;
        width: 210mm;
        height: 297mm;
        overflow: hidden;
    }
    .project-card:hover, .timeline-item:hover .timeline-marker, .tag:hover {
        transform: none;
    }
}