@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Premium Modern Light Theme Color Palette */
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --white: rgba(255, 255, 255, 0.85);
    --border-color: rgba(255, 255, 255, 0.4);
    --btn-secondary-bg: rgba(255, 255, 255, 0.7);
    --btn-secondary-hover-bg: rgba(255, 255, 255, 1);
    --btn-secondary-border: rgba(0, 0, 0, 0.05);
    
    /* Shadows */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 50px rgba(139, 92, 246, 0.15);

    /* Gradients */
    --gradient-text: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
    --gradient-bg: linear-gradient(-45deg, #f1f5f9, #e2e8f0, #eff6ff, #f8fafc);

    /* Header specific colors */
    --phone-icon: #f43f5e;
    --email-icon: #8b5cf6;

    /* Toggle switch */
    --toggle-bg: #cbd5e1;
}

[data-theme="dark"] {
    --bg-color: #0b1121; /* Midnight slate blue instead of pure black */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8; /* Lighter slate gray for better readability */
    --accent-primary: #60a5fa; /* Brighter blue */
    --accent-secondary: #c084fc; /* Purple */
    --white: rgba(30, 41, 59, 0.85); /* Slate 800 - much better contrast for cards */
    --border-color: rgba(148, 163, 184, 0.15); /* More visible borders */
    --btn-secondary-bg: rgba(51, 65, 85, 0.6);
    --btn-secondary-hover-bg: rgba(71, 85, 105, 0.8);
    --btn-secondary-border: rgba(255, 255, 255, 0.15);
    
    /* Dark mode optimized shadows */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(96, 165, 250, 0.2); /* Colored shadow for glow */

    --gradient-text: linear-gradient(135deg, #60a5fa, #c084fc, #f472b6);
    --gradient-bg: linear-gradient(-45deg, #0b1121, #0f172a, #111827, #0b1121);
    --toggle-bg: #c084fc;
    --phone-icon: #fb7185;
    --email-icon: #e879f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Premium Animated Aurora Background */
body::before, body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body::before {
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    animation: auroraOrb 20s ease-in-out infinite alternate;
}

body::after {
    background: radial-gradient(circle at 50% 80%, rgba(219, 39, 119, 0.1), transparent 30%);
    animation: auroraOrb2 15s ease-in-out infinite alternate-reverse;
}

[data-theme="dark"] body::before {
    background: radial-gradient(circle at 15% 50%, rgba(96, 165, 250, 0.18), transparent 30%),
                radial-gradient(circle at 85% 30%, rgba(192, 132, 252, 0.18), transparent 30%);
}

[data-theme="dark"] body::after {
    background: radial-gradient(circle at 50% 80%, rgba(244, 114, 182, 0.15), transparent 35%);
}

@keyframes auroraOrb {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.2) translate(5%, 5%); }
    100% { transform: scale(1) translate(-5%, -5%); }
}

@keyframes auroraOrb2 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.5) translate(-5%, 10%); }
    100% { transform: scale(1) translate(5%, -10%); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism Header */
.header {
    background: var(--white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Premium Profile Image Orb */
.profile-img-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), #db2777);
    background-size: 200% 200%;
    animation: gradientBG 5s ease infinite, floatImage 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

@keyframes floatImage {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.profile-img-container:hover {
    transform: scale(1.05) rotate(5deg) translateY(-5px);
    box-shadow: 0 0 45px rgba(139, 92, 246, 0.6);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    object-fit: cover;
    transition: transform 0.4s ease;
}

.profile-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
    animation: flowGradient 5s linear infinite;
}

@keyframes flowGradient {
    to { background-position: 200% center; }
}

.profile-info .subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    background-size: 200% 200%;
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    background-position: 100% 50%;
}

.btn-primary:hover i {
    transform: scale(1.1) translateY(-1px);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--btn-secondary-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.btn-secondary:hover {
    background-color: var(--btn-secondary-hover-bg);
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent-primary);
}

.btn-secondary:hover i {
    transform: scale(1.1) rotate(-5deg);
}

/* Contact Info */
.contact-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(-5px);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--accent-primary);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--toggle-bg);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.slider .sun-icon {
    color: #f59e0b;
    font-size: 14px;
}

.slider .moon-icon {
    color: #f1f5f9;
    font-size: 14px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    border-radius: 50%;
    z-index: 2;
}

input:checked+.slider {
    background-color: var(--toggle-bg);
}

input:checked+.slider:before {
    transform: translateX(30px);
}

.phone-icon {
    color: var(--phone-icon);
}

.email-icon {
    color: var(--email-icon);
}

/* Main Content */
.main-content {
    max-width: 1300px;
    margin: 4rem auto;
    padding: 0 5%;
}

.gallery-title {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.gallery-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Bento Grid System */
.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.certificate-card {
    background: var(--white);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.certificate-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0.5;
}

.certificate-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.certificate-card:hover::after {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 1;
}

.card-image-wrapper {
    width: 100%;
    height: 220px;
    padding: 1.5rem;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.certificate-card:hover .card-image-wrapper {
    background: var(--white);
}

.card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s ease;
}

.certificate-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-body p {
    font-size: 0.9rem;
    color: var(--accent-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-body p::before {
    content: '\f073';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.pdf-modal-content {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: var(--white);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .pdf-modal-content {
    transform: scale(1);
}

.pdf-modal-header {
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#pdfIframe {
    flex-grow: 1;
    width: 100%;
    border: none;
    background: var(--bg-color);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.close-modal:hover {
    background: var(--phone-icon);
    transform: rotate(90deg);
}

/* Sections & New Components */
.section-title {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    text-align: center;
}

/* Skills Section */
.skills-section,
.projects-section,
.certificates-section {
    margin-bottom: 5rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--white);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.skill-category::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0.5;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category:hover::after {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 1;
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--bg-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--btn-secondary-border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}

.skill-tag:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    transform: translateY(-4px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.project-tech span {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 0.8rem;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .contact-section {
        text-align: left;
        align-items: flex-start;
    }

    .contact-item {
        justify-content: flex-start;
    }

    .theme-switch-wrapper {
        position: absolute;
        top: 1.5rem;
        right: 5%;
    }
}

@media (max-width: 600px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .buttons {
        justify-content: center;
    }

    .contact-section {
        align-items: center;
        width: 100%;
    }

    .contact-item {
        justify-content: center;
    }
}