/* Modern Professional CV Styling */

/* CSS Custom Properties for Performance */
:root {
    /* Color Palette */
    --color-primary: #16A085;
    --color-primary-light: #1ABC9C;
    --color-secondary: #3498DB;
    --color-dark: #2C3E50;
    --color-dark-medium: #34495E;
    --color-gray: #7F8C8D;
    --color-red: #E74C3C;
    --color-orange: #E67E22;
    --color-orange-light: #F39C12;
    --color-purple: #9B59B6;
    --color-bg-light: #F8FAFB;
    --color-border: #E8EFF5;
    --color-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #16A085 0%, #1ABC9C 100%);
    --gradient-bg: linear-gradient(135deg, #F0F5F9 0%, #E8EFF5 100%);

    /* Shadows */
    --shadow-sm: 0 5px 15px rgba(22, 160, 133, 0.3);
    --shadow-md: 0 5px 20px rgba(52, 152, 219, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-base: all 0.3s ease;
}

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--gradient-bg);
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header Section */
.header {
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 40px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid var(--color-white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.profile-info h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.title {
    font-size: 1.3em;
    margin-bottom: 8px;
    opacity: 0.95;
}

.tagline {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.contact-links {
    margin-top: 15px;
}

.contact-links a {
    color: var(--color-white);
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-right: 10px;
    display: inline-block;
    margin-top: 5px;
    transition: var(--transition-base);
}

.contact-links a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding: 40px;
    border-bottom: 1px solid var(--color-border);
}

.section:last-child {
    border-bottom: none;
}

.section h2 {
    color: var(--color-primary);
    font-size: 2em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

.section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.achievement-card {
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-card h3 {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.achievement-card p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.achievement-card small {
    opacity: 0.9;
    font-size: 0.9em;
}

/* Job Experience */
.job {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--color-bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.job h3 {
    color: var(--color-dark);
    font-size: 1.5em;
    margin-bottom: 8px;
}

.company {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.job-description {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--color-dark-medium);
}

.job ul {
    list-style: none;
    padding-left: 0;
}

.job ul li {
    padding-left: 25px;
    margin-bottom: 12px;
    position: relative;
    line-height: 1.7;
}

.job ul li:before {
    content: "▸";
    color: var(--color-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.job a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.job a:hover {
    text-decoration: underline;
}

/* Project Cards */
.project-card {
    background: var(--color-bg-light);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid var(--color-secondary);
    transition: var(--transition-base);
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.project-card h3 {
    color: var(--color-dark);
    font-size: 1.4em;
    margin-bottom: 12px;
}

.tech-stack {
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.project-card p {
    margin-bottom: 10px;
    line-height: 1.7;
}

.project-card a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.project-card a:hover {
    text-decoration: underline;
}

/* Skills Section */
.skills-category {
    margin-bottom: 30px;
}

.skills-category h3 {
    color: var(--color-dark-medium);
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    transition: var(--transition-base);
}

.skill-tag.expert {
    background: var(--color-primary);
    color: var(--color-white);
}

.skill-tag.expert:hover {
    background: #138D75;
    transform: translateY(-2px);
}

/* Certifications Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cert-card {
    background: var(--color-bg-light);
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid var(--color-secondary);
    transition: var(--transition-base);
}

.cert-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.cert-card h4 {
    color: var(--color-dark);
    font-size: 1.2em;
    margin-bottom: 10px;
}

.cert-score {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.cert-card p {
    color: var(--color-gray);
    font-size: 0.95em;
}

.education {
    background: var(--color-bg-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--color-purple);
}

.education h4 {
    color: var(--color-dark);
    font-size: 1.2em;
    margin-bottom: 8px;
}

.education p {
    color: var(--color-gray);
}

/* Publications */
.publication {
    background: var(--color-bg-light);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid var(--color-red);
}

.publication h4 {
    color: var(--color-dark);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.pub-details {
    color: var(--color-red);
    font-weight: 600;
    margin-bottom: 12px;
}

.publication a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.publication a:hover {
    text-decoration: underline;
}

/* Awards List */
.awards-list {
    list-style: none;
    padding: 0;
}

.awards-list li {
    padding: 15px 20px;
    margin-bottom: 12px;
    background: var(--color-bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--color-orange-light);
    line-height: 1.7;
}

.awards-list li strong {
    color: var(--color-orange);
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 30px 40px;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    padding: 8px 15px;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-text {
    margin-bottom: 8px;
    opacity: 0.9;
}

.footer-location {
    opacity: 0.8;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 8px;
    }

    .header {
        padding: 25px;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .profile-info h1 {
        font-size: 2em;
    }

    .section {
        padding: 25px 20px;
    }

    .section h2 {
        font-size: 1.6em;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .skills-list {
        flex-direction: column;
    }

    .skill-tag {
        text-align: center;
    }

    .job {
        padding: 20px;
    }

    .footer {
        padding: 25px 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: var(--color-white);
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .header {
        background: var(--color-primary);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .achievement-card,
    .project-card,
    .cert-card {
        break-inside: avoid;
    }

    .footer {
        background: var(--color-dark);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    a {
        text-decoration: none;
        color: inherit;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--color-primary);
    color: var(--color-white);
}

::-moz-selection {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
}

.form-submit {
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Styled List Items */
.styled-list {
    list-style: none;
    padding-left: 0;
}

.styled-list-item {
    padding-left: 25px;
    margin-bottom: 12px;
    position: relative;
    line-height: 1.7;
}

.styled-list-item::before {
    content: '▸';
    color: var(--color-secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
}
/* ===== MODERN ENHANCEMENTS ===== */

/* Dark Mode Styles */
body.dark-mode {
    --color-primary: #1ABC9C;
    --color-primary-light: #16A085;
    --color-secondary: #3498DB;
    --color-dark: #ECF0F1;
    --color-dark-medium: #BDC3C7;
    --color-gray: #95A5A6;
    --color-bg-light: #1C2833;
    --color-border: #34495E;
    --color-white: #0E1419;
    --gradient-bg: linear-gradient(135deg, #0E1419 0%, #1C2833 100%);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 5px 15px rgba(26, 188, 156, 0.5);
}

body.dark-mode .container {
    background: #16202B;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

body.dark-mode .section {
    border-bottom-color: #2C3E50;
}

body.dark-mode .job,
body.dark-mode .project-card,
body.dark-mode .cert-card,
body.dark-mode .education,
body.dark-mode .publication,
body.dark-mode .awards-list li {
    background: #1C2833;
}

body.dark-mode .header {
    background: linear-gradient(135deg, #16A085 0%, #1ABC9C 100%);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 20px rgba(22, 160, 133, 0.6);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    stroke: white;
    position: absolute;
    transition: all 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
body:not(.loaded) .container {
    opacity: 0;
    transform: translateY(20px);
}

body.loaded .container {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Profile Image */
.profile-img {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Animated Gradient Background */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header {
    background: linear-gradient(-45deg, #16A085, #1ABC9C, #3498DB, #2980B9);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Enhanced Hover Effects */
.achievement-card,
.project-card,
.cert-card,
.job {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(22, 160, 133, 0.4);
}

.project-card:hover {
    transform: translateX(10px) scale(1.01);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

.cert-card:hover {
    transform: translateY(-5px) rotate(1deg);
}

/* Skill Tags Enhanced */
.skill-tag {
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.skill-tag:hover::before {
    left: 100%;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.cert-score {
    animation: pulse 2s ease-in-out infinite;
}

/* Improved Link Hover Effects */
a {
    position: relative;
    transition: all 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Cursor Trail (Optional) */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    pointer-events: none;
    opacity: 0.6;
    animation: trailFade 1s ease-out forwards;
    z-index: 9999;
}

@keyframes trailFade {
    to {
        opacity: 0;
        transform: scale(0);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(22, 160, 133, 0.6);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
    }

    .fab {
        width: 50px;
        height: 50px;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* Print Optimizations for Modern Features */
@media print {
    .dark-mode-toggle,
    .floating-actions,
    .scroll-progress,
    .cursor-trail {
        display: none !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .header {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

