/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Background Pattern - Updated for movement */
aside.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
    opacity: 0.15;
    padding: 1rem;
}

.pattern-icon {
    font-size: 3.8rem;
    color: var(--primary);
    filter: saturate(150%);
    margin: 2rem;
    animation: floatIcon 12s ease-in-out infinite;
    transform: translateX(var(--x-offset)) translateY(var(--y-offset));
    justify-self: center;
    align-self: center;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.pattern-icon:nth-child(1) { --x-offset: 15%; --y-offset: 30%; }
.pattern-icon:nth-child(2) { --x-offset: -20%; --y-offset: -35%; }
.pattern-icon:nth-child(3) { --x-offset: 5%; --y-offset: 40%; }
.pattern-icon:nth-child(4) { --x-offset: -10%; --y-offset: -25%; }
.pattern-icon:nth-child(5) { --x-offset: 25%; --y-offset: 35%; }
.pattern-icon:nth-child(6) { --x-offset: -15%; --y-offset: -40%; }
.pattern-icon:nth-child(7) { --x-offset: 20%; --y-offset: 25%; }
.pattern-icon:nth-child(8) { --x-offset: -25%; --y-offset: -35%; }
.pattern-icon:nth-child(9) { --x-offset: 10%; --y-offset: 45%; }
.pattern-icon:nth-child(10) { --x-offset: -25%; --y-offset: -30%; }
.pattern-icon:nth-child(11) { --x-offset: 15%; --y-offset: 25%; }
.pattern-icon:nth-child(12) { --x-offset: -20%; --y-offset: -40%; }
.pattern-icon:nth-child(13) { --x-offset: 25%; --y-offset: 35%; }
.pattern-icon:nth-child(14) { --x-offset: -15%; --y-offset: -25%; }
.pattern-icon:nth-child(15) { --x-offset: 20%; --y-offset: 30%; }

@keyframes floatIcon {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(8px, -8px);
    }
    50% {
        transform: translate(-4px, 12px);
    }
    75% {
        transform: translate(-8px, -4px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Profile Section */
.profile-section {
    display: flex;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.profile-section:hover {
    transform: translateY(-5px);
}

/* Profile Image */
.profile-image {
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg), 0 0 0 6px rgba(37, 99, 235, 0.1);
    transition: box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
}

.profile-image:hover img {
    box-shadow: var(--shadow-lg), 0 0 0 8px rgba(37, 99, 235, 0.15);
}

.profile-info {
    flex-grow: 1;
}

.profile-info h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-info h2 {
    color: #3498db;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.intro {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Contact Information */
.contact-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-info > * {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link {
    text-decoration: none;
    color: var(--dark);
    transition: color 0.2s ease;
}

.contact-link:hover,
.contact-link:focus {
    color: var(--primary);
}

.contact-info i {
    color: var(--primary);
}

/* Section Styles */
.section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.section:hover {
    transform: translateY(-5px);
}

.section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    color: #3498db;
}

/* Experience Section */
.experience-item {
    margin-bottom: 2rem;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.experience-header h4 {
    color: #3498db;
    font-size: 1.2rem;
}

.experience-header span {
    color: #666;
    font-size: 0.9rem;
}

.experience-item h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.experience-item ul {
    list-style-position: inside;
    color: #666;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-section {
    position: relative;
    padding-left: 1.5rem;
}

.skill-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.skill-section:hover::before {
    transform: scaleY(1);
}

.skill-section h3 {
    font-size: 1.1rem;
}

.skill-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skill-section li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.skill-section li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Project Section */
.project-card {
    background: transparent !important;
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .project-card {
    background: transparent !important;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h4 {
    color: #3498db;
    margin-bottom: 1rem;
}

.project-card ul ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Education and Languages Section */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.education-item {
    margin-bottom: 1.5rem;
}

.education-item h4 {
    color: #3498db;
}

.education-item p {
    color: #666;
}

.education-item span {
    color: #999;
    font-size: 0.9rem;
}

.languages div {
    margin-bottom: 0.5rem;
}

.language-label {
    font-weight: bold;
    color: #2c3e50;
}

/* Interests Section */
.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.interest-tag {
    background: var(--light);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.interest-tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.interest-tag i {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-info {
        justify-content: center;
    }

    .experience-header {
        flex-direction: column;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .section {
        padding: 1.5rem;
    }
}

/* CSS variables for dark mode */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-light: #93c5fd;
    --dark: #f1f5f9;
    --gray: #cbd5e1;
    --light: #1e293b;
    --white: #0f172a;
}

[data-theme="dark"] {
    /* Text colors */
    .profile-info h1,
    .profile-info h2,
    .section h3,
    .experience-header h4,
    .experience-item h5,
    .project-card h4,
    .education-item h4,
    .language-label {
        color: var(--gray);
    }

    /* Background colors */
    .project-card {
        background: transparent !important;
    }

    /* Content text colors */
    .intro,
    .experience-header span,
    .experience-item ul,
    .education-item p,
    .education-item span {
        color: #94a3b8;
    }

    /* Contact info */
    .contact-link,
    .contact-info div {
        color: var(--gray);
    }

    /* Skills section */
    .skill-section li {
        color: #94a3b8;
    }

    /* Project card */
    .project-card ul,
    .project-card ul ul {
        color: #94a3b8;
    }

    /* Update contact colors */
    .contact-link,
    .contact-info div {
        color: var(--gray);
    }

    .contact-info i {
        color: var(--primary);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .profile-section,
    .section,
    .interest-tag,
    .dark-mode-toggle,
    .profile-image::after {
        transition: none;
    }

    @keyframes pulse {
        0%, 50%, 100% {
            transform: none;
            opacity: 1;
        }
    }

    .pattern-icon {
        animation: none;
    }
}

/* Focus States */
.contact-link:focus,
.interest-tag:focus,
.dark-mode-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    @page {
        margin: 15mm;
        size: A4;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        font-size: 11pt;
        line-height: 1.4;
        background: none !important;
        color: black !important;
    }

    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .section {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 10mm;
        border: none !important;
        box-shadow: none !important;
    }

    .experience-item,
    .project-card,
    .education-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 5mm;
    }

    .skills-grid,
    .two-column-grid {
        break-inside: avoid;
        page-break-inside: avoid;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 5mm !important;
    }

    /* Hide non-essential elements */
    .background-pattern,
    .dark-mode-toggle,
    .download-button,
    .scroll-top,
    .interest-tag:hover {
        display: none !important;
    }

    /* Ensure proper text contrast */
    h1, h2, h3, h4, h5, h6,
    p, li, span {
        color: black !important;
    }

    a {
        text-decoration: none !important;
        color: black !important;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Dark mode toggle button styles */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Ensure button is visible in dark mode */
[data-theme="dark"] .dark-mode-toggle {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* Dark mode compatibility */
[data-theme="dark"] .profile-section,
[data-theme="dark"] .section {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Random animations for each icon */
.pattern-icon:nth-child(1) { animation: float1 15s ease-in-out infinite; }
.pattern-icon:nth-child(2) { animation: float2 18s ease-in-out infinite; }
.pattern-icon:nth-child(3) { animation: float3 16s ease-in-out infinite; }
.pattern-icon:nth-child(4) { animation: float4 17s ease-in-out infinite; }
.pattern-icon:nth-child(5) { animation: float5 19s ease-in-out infinite; }
.pattern-icon:nth-child(6) { animation: float6 14s ease-in-out infinite; }
.pattern-icon:nth-child(7) { animation: float7 20s ease-in-out infinite; }
.pattern-icon:nth-child(8) { animation: float8 16s ease-in-out infinite; }
.pattern-icon:nth-child(9) { animation: float9 18s ease-in-out infinite; }
.pattern-icon:nth-child(10) { animation: float10 15s ease-in-out infinite; }
.pattern-icon:nth-child(11) { animation: float11 17s ease-in-out infinite; }
.pattern-icon:nth-child(12) { animation: float12 19s ease-in-out infinite; }
.pattern-icon:nth-child(13) { animation: float13 16s ease-in-out infinite; }
.pattern-icon:nth-child(14) { animation: float14 18s ease-in-out infinite; }
.pattern-icon:nth-child(15) { animation: float15 15s ease-in-out infinite; }
.pattern-icon:nth-child(16) { animation: float16 17s ease-in-out infinite; }
.pattern-icon:nth-child(17) { animation: float17 19s ease-in-out infinite; }
.pattern-icon:nth-child(18) { animation: float18 16s ease-in-out infinite; }

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -15px); }
    50% { transform: translate(-5px, 10px); }
    75% { transform: translate(15px, 5px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-15px, 10px); }
    50% { transform: translate(10px, -5px); }
    75% { transform: translate(-5px, 15px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, 5px); }
    50% { transform: translate(-10px, -15px); }
    75% { transform: translate(5px, 10px); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, -10px); }
    50% { transform: translate(15px, 5px); }
    75% { transform: translate(-10px, 15px); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, 15px); }
    50% { transform: translate(-15px, -5px); }
    75% { transform: translate(5px, -10px); }
}

@keyframes float6 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-10px, -5px); }
    50% { transform: translate(5px, 15px); }
    75% { transform: translate(-15px, -10px); }
}

@keyframes float7 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, -10px); }
    50% { transform: translate(-5px, 5px); }
    75% { transform: translate(10px, -15px); }
}

@keyframes float8 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-15px, 15px); }
    50% { transform: translate(10px, -10px); }
    75% { transform: translate(-5px, 5px); }
}

@keyframes float9 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -15px); }
    50% { transform: translate(-10px, 10px); }
    75% { transform: translate(15px, -5px); }
}

@keyframes float10 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-10px, 5px); }
    50% { transform: translate(15px, -15px); }
    75% { transform: translate(-5px, 10px); }
}

@keyframes float11 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, 10px); }
    50% { transform: translate(-15px, -10px); }
    75% { transform: translate(5px, 15px); }
}

@keyframes float12 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, -15px); }
    50% { transform: translate(10px, 5px); }
    75% { transform: translate(-15px, -5px); }
}

@keyframes float13 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, -5px); }
    50% { transform: translate(-10px, 15px); }
    75% { transform: translate(5px, -15px); }
}

@keyframes float14 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-15px, 10px); }
    50% { transform: translate(5px, -5px); }
    75% { transform: translate(-10px, 15px); }
}

@keyframes float15 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -10px); }
    50% { transform: translate(-5px, 15px); }
    75% { transform: translate(15px, -5px); }
}

@keyframes float16 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-10px, 15px); }
    50% { transform: translate(15px, -15px); }
    75% { transform: translate(-5px, 5px); }
}

@keyframes float17 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -5px); }
    50% { transform: translate(-15px, 10px); }
    75% { transform: translate(10px, -15px); }
}

@keyframes float18 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, 10px); }
    50% { transform: translate(15px, -5px); }
    75% { transform: translate(-10px, 15px); }
}

/* Download and Scroll to Top buttons */
.download-button,
.scroll-top {
    position: fixed;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.download-button {
    top: 80px;
    right: 20px;
}

.scroll-top {
    bottom: 20px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.download-button:hover,
.scroll-top:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: var(--white);
}

/* Dark mode compatibility */
[data-theme="dark"] .download-button,
[data-theme="dark"] .scroll-top {
    background: var(--white);
    color: var(--primary);
}

.qr-code {
    position: absolute;
    top: 3rem;
    right: 3rem;
    width: 25mm;
    height: 25mm;
    display: none;
} 