/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    /* Professional Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #0f172a;
    --accent-color: #f59e0b;

    /* Neutral Colors */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-alt: #f1f5f9;
    --border-color: #e2e8f0;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Dark Mode Colors */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #f8fafc;
    --accent-color: #fbbf24;

    /* Dark Neutral Colors */
    --text-dark: #f1f5f9;
    --text-medium: #cbd5e1;
    --text-light: #94a3b8;
    --bg-white: #0f172a;
    --bg-light: #1e293b;
    --bg-alt: #334155;
    --border-color: #334155;

    /* Dark Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-white);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: background-color 0.3s ease, var(--transition-smooth);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding-top: 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 60px 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2rem;
    opacity: 0.85;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-social {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 1.2rem;
}

.social-link:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.1);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.image-wrapper:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.2));
    pointer-events: none;
}

/* ==========================================
   Sections
   ========================================== */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ==========================================
   About Section
   ========================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.personality-traits {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.personality-traits h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.personality-traits ul {
    list-style: none;
}

.personality-traits li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.personality-traits i {
    color: var(--primary-color);
}

/* ==========================================
   Timeline (Experience)
   ========================================== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 30px;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-content {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 20px;
}

.company-name {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.company-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.timeline-list {
    list-style: none;
    padding-left: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

.timeline-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ==========================================
   Projects Section
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-content {
    padding: 2rem;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background: var(--bg-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.project-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.project-desc {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.project-features li {
    font-size: 0.875rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.project-features i {
    color: var(--primary-color);
    width: 16px;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: var(--bg-alt);
    color: var(--text-medium);
    border-radius: 4px;
}

/* ==========================================
   Skills Section
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.125rem;
}

.skill-category i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.skill-bar {
    height: 8px;
    background: var(--bg-alt);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 10px;
    transition: width 1s ease;
}

/* ==========================================
   Achievements Section
   ========================================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.achievement-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-smooth);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.achievement-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color), #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.achievement-icon i {
    font-size: 2rem;
    color: white;
}

.achievement-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.achievement-card p {
    color: var(--text-medium);
}

/* ==========================================
   Education Section
   ========================================== */
.education-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 2rem;
    align-items: center;
    transition: var(--transition-smooth);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i {
    font-size: 2rem;
    color: white;
}

.education-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.education-major {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-details {
    color: var(--text-medium);
}

/* ==========================================
   Hobbies Section
   ========================================== */
.hobbies-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    min-width: 140px;
}

.hobby-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hobby-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.hobby-item span {
    font-weight: 600;
    color: var(--text-dark);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-card p {
    color: var(--text-medium);
    word-break: break-word;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        justify-content: center;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    .hero-social {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -30px;
    }

    .timeline-header {
        flex-direction: column;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .quick-info {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: 60px 0;
    }
}

/* ==========================================
   Dark Mode Toggle Button
   ========================================== */
.theme-toggle {
    background: none;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.2rem;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* ==========================================
   QR Code Section
   ========================================== */
.qr-section {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.qr-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.qr-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.qr-section p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.qr-code-wrapper {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.qr-code-wrapper img {
    width: 200px;
    height: 200px;
    display: block;
}

/* ==========================================
   Print Styles for PDF Export
   ========================================== */
@media print {

    /* Reset for print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide elements not needed in PDF */
    .navbar,
    .theme-toggle,
    .mobile-menu-toggle,
    .hero-buttons,
    .qr-section,
    .footer {
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 1.5cm;
        size: A4;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
        line-height: 1.4;
    }

    /* Hero section for print */
    .hero {
        min-height: auto;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        padding: 2rem 0 !important;
        page-break-after: avoid;
    }

    .hero-content {
        padding: 1rem 0 !important;
    }

    .hero-title {
        font-size: 2rem !important;
        color: white !important;
    }

    .hero-subtitle {
        font-size: 1.2rem !important;
        color: white !important;
    }

    .hero-description {
        font-size: 0.95rem !important;
        color: white !important;
    }

    .hero-social {
        display: none !important;
    }

    .image-wrapper {
        width: 150px !important;
        height: 150px !important;
    }

    /* Sections */
    .section {
        padding: 1.5rem 0 !important;
        page-break-inside: avoid;
    }

    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        color: #2563eb !important;
        page-break-after: avoid;
    }

    /* Timeline */
    .timeline-item {
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }

    .timeline-content {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Cards */
    .project-card,
    .skill-category,
    .achievement-card,
    .education-card,
    .hobby-item {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
        page-break-inside: avoid;
    }

    /* Links */
    a {
        color: #2563eb !important;
        text-decoration: none !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* Contact cards - show info */
    .contact-card {
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }
}