/* --- Cosmic Space Theme Global Styles --- */
:root {
    /* Cosmic Color Palette */
    --space-bg: linear-gradient(135deg, #0b0f19 0%, #111827 40%, #1e1b4b 100%);
    --card-bg: rgba(17, 24, 39, 0.75); /* Translucent dark cards */
    --card-border: rgba(99, 102, 241, 0.15); /* Soft galaxy indigo stroke */
    
    /* Cosmic Accents */
    --cosmic-cyan: #06b6d4;
    --cosmic-purple: #a855f7;
    --cosmic-indigo: #6366f1;
    
    /* Text Typography */
    --text-bright: #f3f4f6;
    --text-glow: #e0e7ff;
    --text-muted: #9ca3af;
    --border-radius: 12px;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--space-bg);
    color: var(--text-bright);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#cv-content {
    background: var(--space-bg);
    width: 100%;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px;
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    background: radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%), 
                radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
                rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
    color: white;
    padding: 60px 20px;
    margin-bottom: 10px;
}

.hero-flex {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 160px;
    height: 185px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 2px solid var(--cosmic-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.hero-text {
    flex-grow: 1;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff, var(--text-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .subtitle {
    color: var(--cosmic-cyan);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.hero-text .bio {
    max-width: 720px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Download Button --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--cosmic-indigo) 0%, var(--cosmic-purple) 100%);
    color: white;
    padding: 12px 26px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4), 0 0 12px rgba(6, 182, 212, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hide on direct browser print commands */
@media print {
    .no-print {
        display: none !important;
    }
}

/* --- Main Layout Grid --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
    padding-top: 5px;
}

/* --- Cards --- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card h2, .card h3 {
    margin-bottom: 20px;
    color: var(--text-bright);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card h3 {
    font-size: 1.15rem;
}

.card h2 i, .card h3 i {
    color: var(--cosmic-cyan);
    margin-right: 10px;
}

/* --- Sidebar Items --- */
.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.95rem;
    color: #d1d5db;
}

.contact-list i {
    color: var(--cosmic-indigo);
    width: 18px;
    margin-top: 4px;
    flex-shrink: 0;
}

/* Ordered Vertically Stacked Lists */
.skills-list {
    list-style: none;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.skills-list li {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    margin: 6px 0 !important;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #e5e7eb;
    font-weight: 500;
    border-left: 3px solid var(--cosmic-purple);
    box-sizing: border-box;
}

.subtitle-ref {
    color: var(--cosmic-cyan);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 2px;
}

/* --- Experience Items --- */
.timeline-item {
    margin-bottom: 24px;
    padding-left: 20px;
    border-left: 2px solid var(--cosmic-indigo);
}

.timeline-item h4 {
    color: var(--text-bright);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.timeline-item .date {
    font-size: 0.85rem;
    color: var(--cosmic-cyan);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item p {
    color: #d1d5db;
}

/* --- Projects --- */
.project-item {
    padding: 4px 0;
}

.project-item h4 {
    color: var(--text-bright);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.project-status {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-desc {
    color: #d1d5db;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cosmic-cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.project-link:hover {
    color: white;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.project-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 22px 0;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Page-Break Rules for PDF Generation --- */
.html2pdf__page-break {
    page-break-before: always !important;
    break-before: always !important;
    display: none;
}

/* --- Responsive Media Queries --- */
@media (max-width: 820px) {
    .container {
        padding: 15px;
    }
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero {
        padding: 40px 15px;
        text-align: center;
    }
    .hero-flex {
        flex-direction: column;
        gap: 25px;
    }
    .hero-image img {
        width: 130px;
        height: 155px;
    }
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .card {
        padding: 22px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.85rem;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .mt-mobile-fix {
        margin-top: 15px;
    }
}

/* --- Print/PDF Engine Tweaks --- */
@media print {
    .html2pdf__page-break {
        display: block !important;
    }
    body, #cv-content {
        background: #0b0f19 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .card {
        background: rgba(17, 24, 39, 0.9) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
    }
    .content .card:nth-child(2) {
        page-break-before: always !important;
        break-before: always !important;
    }
}
