:root {
    /* Dark Theme Default - Graphite & Monochrome Charcoal */
    --bg-color: #0d0f12;
    --bg-gradient: radial-gradient(circle at 15% 15%, #1a1d24 0%, #111318 50%, #08090b 100%);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #e5e7eb;
    --accent-glow: rgba(229, 231, 235, 0.15);
    --accent-secondary: #9ca3af;
    --glass-bg: rgba(22, 25, 31, 0.78);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --card-hover: rgba(32, 36, 45, 0.85);
    --timeline-line: #27272a;
    --tag-bg: rgba(255, 255, 255, 0.06);
    --tag-border: rgba(255, 255, 255, 0.12);
    --decor-1: rgba(255, 255, 255, 0.03);
    --decor-2: rgba(255, 255, 255, 0.02);
}

body.light-theme {
    /* Light Theme - Clean Neutral Gray & Graphite */
    --bg-color: #f3f4f6;
    --bg-gradient: radial-gradient(circle at 15% 15%, #ffffff 0%, #f3f4f6 50%, #e5e7eb 100%);
    --text-main: #111827;
    --text-muted: #4b5563;
    --accent: #1f2937;
    --accent-glow: rgba(31, 41, 55, 0.1);
    --accent-secondary: #374151;
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(209, 213, 219, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
    --card-hover: rgba(255, 255, 255, 0.95);
    --timeline-line: #d1d5db;
    --tag-bg: rgba(0, 0, 0, 0.05);
    --tag-border: rgba(0, 0, 0, 0.12);
    --decor-1: rgba(0, 0, 0, 0.03);
    --decor-2: rgba(0, 0, 0, 0.02);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Background Decorations */
.background-decor {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.4s ease;
}
.decor-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--decor-1);
}
.decor-2 {
    bottom: -10%;
    right: -10%;
    width: 650px;
    height: 650px;
    background: var(--decor-2);
}

/* Layout Container */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Top Bar Control (Theme Switcher & PDF Link) */
.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}
.action-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}
body.light-theme .action-btn:hover {
    color: #fff;
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--text-muted), var(--accent), var(--text-muted));
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}
.hero-text {
    flex: 1;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Work Meta Badges */
.work-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--text-main);
}
.meta-badge svg {
    color: var(--text-muted);
}

/* Contact Links & Messaging Apps */
.contact-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}
.contact-link:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
    transform: translateY(-2px);
    background: var(--tag-bg);
}

.messenger-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.25rem;
}
.app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.app-icon:hover {
    transform: scale(1.15) translateY(-2px);
    filter: brightness(1.15);
}
.app-icon.telegram { background: #24A1DE; }
.app-icon.whatsapp { background: #25D366; }
.app-icon.max-app {
    background: linear-gradient(135deg, #4b5563, #1f2937);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero Photo */
.hero-photo-wrapper {
    flex-shrink: 0;
}
.hero-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 6px var(--tag-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-photo:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 8px var(--tag-border);
}

/* Stats Counter Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}
.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--text-main);
    flex-shrink: 0;
}
.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
}

/* Sidebar Widgets */
.widget {
    margin-bottom: 2rem;
}
.widget h2 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.widget h2 svg {
    color: var(--text-muted);
}

.about-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.info-list {
    list-style: none;
}
.info-list li {
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}
.info-list strong {
    color: var(--text-main);
}

.skills-list {
    list-style: none;
}
.skills-list li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.skills-list li::before {
    content: "•";
    color: var(--text-muted);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag {
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Certificates List Unified Styling */
.cert-list {
    list-style: none;
}
.cert-list li {
    margin-bottom: 0.85rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.cert-list li:hover {
    border-color: var(--text-muted);
    transform: translateX(4px);
}
.cert-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.3rem;
}
.cert-name {
    display: block;
    font-weight: 600;
    color: var(--text-main);
}

/* Education List */
.edu-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.edu-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}
.edu-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Timeline Section */
.section-title {
    font-size: 1.75rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.section-title svg {
    color: var(--text-muted);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover {
    transform: translateX(6px);
    border-color: var(--text-muted);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.timeline-dot {
    position: absolute;
    left: -2.45rem;
    top: 1.75rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-main);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--text-muted);
    z-index: 2;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.project-role {
    font-size: 1.35rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.project-info, .project-goal {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.project-info strong, .project-goal strong, .project-results strong {
    color: var(--text-main);
}
.project-results {
    margin-top: 1rem;
    font-size: 0.95rem;
}
.project-results ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}
.project-results li {
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}

/* Lessons Learned */
.project-experience {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--tag-bg);
    border-left: 3px solid var(--text-muted);
    border-radius: 0 10px 10px 0;
    color: var(--text-muted);
}
.project-experience strong {
    color: var(--text-main);
}

/* Back to Top Floating Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover {
    background: var(--text-main);
    color: var(--bg-color);
    border-color: var(--text-main);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Print Styles for PDF Generation */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
    }
    .top-actions, .scroll-top-btn, .background-decor {
        display: none !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    .glass-panel {
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 1.2rem !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
    }
    .main-grid {
        display: block !important;
    }
    .sidebar {
        margin-bottom: 1.5rem;
    }
    .hero h1 {
        font-size: 2rem !important;
        color: #000 !important;
    }
    .project-role, .section-title {
        color: #000 !important;
    }
    .timeline::before {
        background: #999 !important;
    }
    .timeline-dot {
        background: #000 !important;
        border-color: #fff !important;
    }
    .timeline-item {
        page-break-inside: avoid;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-photo {
        width: 150px;
        height: 150px;
    }
    .contact-info, .work-meta-badges {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
