:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --sidebar-bg: #2d3748;
    --sidebar-text: #e2e8f0;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 3rem 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    overflow-y: auto;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.avatar-upload-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-upload-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.avatar-upload input[type="file"] {
    display: none;
}

.avatar-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 200px;
}

.profile-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.profile-header .title {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.contact-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.skills-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Skills Detailed Card */
.skills-detailed-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: var(--transition);
    margin-bottom: 2.5rem;
}

.skills-detailed-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.skills-detailed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skills-detailed-list li {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
    padding-left: 1.5rem;
    position: relative;
}

.skills-detailed-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.skills-detailed-list strong {
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tags span {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(96, 165, 250, 0.1));
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sidebar-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-tags span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.skill-tags span:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(96, 165, 250, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skill-tags span:hover::before {
    left: 100%;
}

/* Main Content Styling */
.main-content {
    padding: 3rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    width: fit-content;
}

/* Summary Card */
.summary-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.summary-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.summary-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.summary-content ul {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.summary-content li {
    position: relative;
    padding-left: 1.5rem;
}

.summary-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 0.5rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-2rem - 6px);
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
}

.time-node {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.content .role {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.content ul {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), #60a5fa);
    opacity: 0.8;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-card h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Education Section */
.education-section {
    margin-top: 2rem;
}

.education-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.education-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), #60a5fa);
    opacity: 0.8;
}

.education-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.education-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.education-item .degree {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.education-item .date {
    font-size: 0.95rem;
    color: var(--text-muted);
    background: rgba(37, 99, 235, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
}

/* Navigation Links */
.nav-links {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.nav-link {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.pdf-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* JSON Section */
.json-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.json-section h2 {
    margin-bottom: 1rem;
}

/* Print styles */
@media print {
    .nav-links {
        display: none !important;
    }
    
    .app-container {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar {
        background: white !important;
        color: #1e293b !important;
        border-right: 1px solid #e2e8f0;
        height: auto !important;
        position: relative !important;
    }
    
    .skill-tags span {
        background: #f1f5f9 !important;
        color: #1e293b !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .summary-card,
    .skills-detailed-card,
    .project-card,
    .education-item {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
        page-break-inside: avoid;
    }
    
    .summary-card:hover,
    .skills-detailed-card:hover,
    .project-card:hover,
    .education-item:hover {
        transform: none !important;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: relative;
        padding: 2rem;
    }

    .main-content {
        padding: 2rem;
    }
}
