/* ===== VARIABLES ===== */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --text: #333;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--secondary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    background: rgba(52, 152, 219, 0.2);
    bottom: 0;
    left: 0;
    z-index: -1;
    border-radius: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::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: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), #2980b9);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    overflow: hidden;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.typing-animation {
    border-right: 3px solid var(--secondary);
    animation: typing 3s steps(20) infinite, blink 0.7s infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes typing {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.stat p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.image-container {
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

.image-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--secondary), transparent, var(--accent));
    z-index: -1;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    cursor: pointer;
    z-index: 2;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid white;
    border-radius: 12px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

.arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===== SECTIONS ===== */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    bottom: -10px;
    left: 15%;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-details {
    margin: 2rem 0;
}

.detail-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light);
}

.detail-item strong {
    min-width: 120px;
    color: var(--primary);
}

.about-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.about-image {
    text-align: center;
}

.image-frame {
    position: relative;
    display: inline-block;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    z-index: -1;
    border-radius: var(--border-radius);
}

.image-frame img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.image-frame:hover img {
    transform: scale(1.05);
}

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-header i {
    font-size: 2rem;
    color: var(--secondary);
}

.category-header h3 {
    margin: 0;
    color: var(--primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), #2980b9);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* ===== EDUCATION SECTION ===== */
.education {
    background: var(--bg-light);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    top: 0;
    right: -10px;
    z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
    right: auto;
}

.timeline-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-date {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===== PROJECTS SECTION ===== */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--secondary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 1;
    transform: translateY(0);
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.project-links a:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--light);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== RESEARCH SECTION ===== */
.research {
    background: var(--bg-white);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--secondary);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.research-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.research-status {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.research-status.accepted {
    background: #d4edda;
    color: #155724;
}

.research-status.review {
    background: #fff3cd;
    color: #856404;
}

.research-status.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.research-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.research-authors {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.research-conference {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.research-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: var(--transition);
}

.research-link:hover {
    gap: 1rem;
    color: var(--primary);
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications {
    background: var(--bg-light);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certification-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.certification-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.certification-header i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.certification-info h3 {
    margin: 0;
    color: var(--primary);
}

.certification-issuer {
    color: var(--text-light);
    font-size: 0.9rem;
}

.certification-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.certification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.certification-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.certification-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.certification-link:hover {
    color: var(--primary);
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-details h4 {
    margin: 0;
    color: var(--primary);
}

.contact-details span {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: var(--shadow);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: -10px;
        right: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-img {
        width: 300px;
        height: 300px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .research-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}