/* Import Inter Font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");

/* Professional Google-Style CV Profile */

:root {
    --primary-color: #0e76bc;
    --primary-light: #4285f4;
    --primary-dark: #1a73e8;
    --background-primary: #f2f2f4;
    --background-white: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    --border-color: #dadce0;
    --shadow-light: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-medium: 0 1px 2px 0 rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
    --shadow-large: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
    --border-radius: 8px;
    --border-radius-large: 12px;
    
    /* Website's Official Font Variables */
    --main-font-family: "Inter", sans-serif;
    --default-font-size: 1.4rem;
    --font-size-xs: 1.0rem;
    --font-size-sm: 1.2rem;
    --font-size-md: 1.4rem;
    --font-size-lg: 1.6rem;
    --font-size-xl: 2.0rem;
    --font-size-2xl: 2.6rem;
    --font-size-3xl: 3.4rem;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--main-font-family);
    font-size: var(--default-font-size);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Profile Container */
.profile-view {
    background: var(--background-primary);
    min-height: 100vh;
}

/* Header Section */
.profile-header {
    background: linear-gradient(-45deg, #0e76bc, #4285f4, #1a73e8, #0066cc, #2196f3, #1976d2);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Add a wave effect overlay */
.profile-header .wave-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"></path><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"></path><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"></path></svg>') repeat-x;
    background-size: 1200px 120px;
    animation: waveMove 10s ease-in-out infinite;
    opacity: 0.1;
    z-index: 2;
}

@keyframes waveMove {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-50px);
    }
}

/* Floating light orbs */
@keyframes floatingOrbs {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.8;
    }
    33% {
        transform: translateY(-15px) translateX(10px) rotate(120deg);
        opacity: 1;
    }
    66% {
        transform: translateY(-5px) translateX(-10px) rotate(240deg);
        opacity: 0.6;
    }
}

/* Enhanced particle animation */
@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(15px, -15px) rotate(90deg) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-10px, -30px) rotate(180deg) scale(0.9);
        opacity: 1;
    }
    75% {
        transform: translate(-25px, -15px) rotate(270deg) scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.4;
    }
}

/* Color shifting animation with smooth transitions */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    20% {
        background-position: 80% 20%;
        filter: hue-rotate(15deg);
    }
    40% {
        background-position: 100% 100%;
        filter: hue-rotate(30deg);
    }
    60% {
        background-position: 20% 100%;
        filter: hue-rotate(15deg);
    }
    80% {
        background-position: 0% 80%;
        filter: hue-rotate(5deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: floatingOrbs 12s ease-in-out infinite;
}

@keyframes floatingOrbs {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.profile-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(10px, 10px);
    }
}

.profile-header-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

/* Add floating particles effect */
.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: floatingOrbs 12s ease-in-out infinite;
    z-index: 1;
}

/* Add animated geometric shapes */
.profile-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 30px 30px, 50px 50px;
    animation: particleFloat 20s linear infinite;
    z-index: 1;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(15px, -15px) rotate(90deg) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-10px, -30px) rotate(180deg) scale(0.9);
        opacity: 1;
    }
    75% {
        transform: translate(-25px, -15px) rotate(270deg) scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.4;
    }
}

/* Enhanced gradient animation with more colors */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    box-shadow: var(--shadow-large);
}

.change-avatar {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--background-white);
    color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-medium);
}

.change-avatar:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.change-avatar input {
    display: none;
}

.profile-info h1 {
    font-size: var(--font-size-3xl);
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.profile-info h2 {
    font-size: var(--font-size-xl);
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    letter-spacing: 0.25px;
}

.profile-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.contact-item i {
    width: 20px;
    font-size: var(--font-size-lg);
    opacity: 0.8;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 0.5rem;
    border-radius: 2px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Google-Style Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 24px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn:hover::before {
    opacity: 0.08;
}

.btn-primary {
    background: var(--background-white);
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Main Content Area */
.cv-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-primary);
}

/* About Section */
.about-section {
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.about-text {
    font-size: var(--default-font-size);
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* CV Grid Layout */
.cv-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* CV Sections */
.cv-section {
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: box-shadow 0.2s ease;
}

.cv-section:hover {
    box-shadow: var(--shadow-medium);
}

.section-header {
    background: var(--background-white);
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-top-left-radius: var(--border-radius-large);
    border-top-right-radius: var(--border-radius-large);
}

.section-header:hover {
    background: linear-gradient(135deg, rgba(14, 118, 188, 0.05), rgba(66, 133, 244, 0.05));
    transform: translateY(-1px);
}

.section-icon {
    font-size: var(--font-size-xl);
    opacity: 0.8;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.25px;
    color: var(--primary-color);
}

.section-content {
    padding: 2rem;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--background-white);
    box-shadow: 0 0 0 2px var(--border-color);
}

.timeline-period {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.timeline-title {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.timeline-subtitle {
    font-size: var(--default-font-size);
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.timeline-field {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

/* Skills Section */
.skills-grid {
    display: grid;
    gap: 1rem;
}

.skill-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-item:last-child {
    border-bottom: none;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.skill-percentage {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--background-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.skill-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    transition: width 1s ease;
}

/* Language Section */
.languages-grid {
    display: grid;
    gap: 1rem;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.language-item:last-child {
    border-bottom: none;
}

.language-name {
    font-weight: 500;
    color: var(--text-primary);
}

.language-level {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Card Components */
.project-card, .achievement-item {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.project-card:hover, .achievement-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.project-card:last-child, .achievement-item:last-child {
    margin-bottom: 0;
}

.project-title, .achievement-title {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.project-institution, .achievement-issuer {
    color: var(--primary-color);
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.project-period, .achievement-date {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.achievement-item {
    border-left: 4px solid var(--primary-color);
}

/* Full Width Sections */
.full-width {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

/* Publications - IEEE Format */
.publication-item {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.publication-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.publication-item:last-child {
    margin-bottom: 0;
}

.ieee-reference {
    font-size: var(--default-font-size);
    line-height: 1.6;
    color: var(--text-primary);
    text-align: justify;
}

.ref-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.ref-authors {
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 0.25rem;
}

.ref-title {
    color: var(--text-primary);
    margin-right: 0.25rem;
}

.ref-journal {
    color: var(--primary-color);
    font-style: italic;
    margin-right: 0.25rem;
}

.ref-volume,
.ref-pages {
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.ref-date {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive spacing for IEEE references */
@media (max-width: 768px) {
    .ieee-reference {
        font-size: var(--font-size-sm);
    }
    
    .ref-number {
        display: block;
        margin-bottom: 0.25rem;
        margin-right: 0;
    }
}

/* Interests */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.interest-tag {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.interest-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

/* Footer Actions */
.profile-footer {
    background: var(--background-white);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-actions {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

.btn-success {
    background: #34a853;
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-success:hover {
    background: #2d9142;
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-actions {
        align-items: center;
    }
    
    .cv-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cv-content {
        padding: 1rem;
    }
    
    .section-content {
        padding: 1.5rem;
    }
    
    .profile-info h1 {
        font-size: var(--font-size-2xl);
    }
    
    .profile-info h2 {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 2rem 0 1.5rem;
    }
    
    .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .profile-info h1 {
        font-size: var(--font-size-2xl);
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .profile-header {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .cv-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cv-section {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .skill-progress {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Material Design Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading Animation for Skills */
@keyframes skillLoad {
    from {
        width: 0;
    }
}

.skill-progress {
    animation: skillLoad 1.5s ease-out;
}

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