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

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #0f3460;
    --accent-color: #16213e;
    --highlight-color: #e94560;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --bg-dark: #edf2f7;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(15, 52, 96, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    letter-spacing: -0.01em;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    padding: 2rem 0;
}

.sidebar-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-profile {
    text-align: center;
}

.sidebar-image-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid rgba(255, 255, 255, 0.9);
    background: var(--gradient-primary);
    padding: 4px;
}

.sidebar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.sidebar-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.sidebar-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.sidebar-contact-item svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--secondary-color);
}

.sidebar-contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    word-break: break-word;
}

.sidebar-contact-item a:hover {
    color: var(--secondary-color);
}

.sidebar-contact-item span {
    line-height: 1.5;
}

.sidebar-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.sidebar-social-link:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 320px;
    min-height: 100vh;
}

/* Page Load Animation */
@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body.loaded {
    animation: pageLoad 0.6s ease-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand a:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(102, 126, 234, 0.03) 2px,
        rgba(102, 126, 234, 0.03) 4px
    );
    animation: patternMove 30s linear infinite;
    pointer-events: none;
}

@keyframes patternMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}


.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 2;
}

.hero-intro-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-intro {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.hero-wave {
    font-size: 1.75rem;
    animation: wave 2s ease-in-out infinite;
    display: inline-block;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    40%, 60% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

.hero-title {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-name {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
    display: block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--highlight-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
    letter-spacing: -0.02em;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.hero-tagline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.tagline-line {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    background: rgba(15, 52, 96, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(15, 52, 96, 0.15);
    transition: var(--transition);
}

.tagline-line:hover {
    background: rgba(15, 52, 96, 0.12);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tagline-separator {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 300;
}

.hero-description {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 900px;
    font-weight: 700;
    text-align: center;
    position: relative;
    
    /* Animated Gradient Text */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--highlight-color) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Combined Animations: fadeInUp, gradientShift, and pulseGlow */
    animation: fadeInUp 0.8s ease 0.8s both, gradientShift 4s ease infinite, pulseGlow 3s ease-in-out infinite;
    
    /* Smooth transitions for hover */
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: default;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(15, 52, 96, 0.3)) drop-shadow(0 0 12px rgba(102, 126, 234, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(15, 52, 96, 0.5)) drop-shadow(0 0 18px rgba(102, 126, 234, 0.4));
    }
}

.hero-description:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(15, 52, 96, 0.6)) drop-shadow(0 0 25px rgba(102, 126, 234, 0.5));
}

.highlight-text {
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 0.2em;
    left: 0;
    right: 0;
    height: 0.3em;
    background: rgba(15, 52, 96, 0.15);
    z-index: -1;
    border-radius: 2px;
    transition: var(--transition);
}

.highlight-text:hover::after {
    height: 0.4em;
    background: rgba(15, 52, 96, 0.25);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 1s both;
}

.hero-cta .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-cta .btn svg {
    transition: var(--transition);
}

.hero-cta .btn:hover svg {
    transform: translateX(5px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: fadeInUp 0.8s ease 1.2s both;
    flex-wrap: wrap;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--gradient-secondary);
    bottom: 15%;
    left: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    top: 50%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.15;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.08;
    }
}


.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a4d7a 100%);
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    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-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--highlight-color) 0%, #d6304f 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--text-light);
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 8rem 0;
    position: relative;
}

section.hero {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

section:nth-child(even) {
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-light) 100%);
}

section.about,
section.skills,
section.publications {
    background: var(--bg-color);
}

section.projects,
section.contact {
    background: var(--bg-light);
}

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title svg {
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(15, 52, 96, 0.2));
}

.section-title:hover svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(15, 52, 96, 0.3));
}

.section-title::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    border-radius: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--highlight-color), var(--secondary-color));
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(15, 52, 96, 0.3);
}

/* Stats Section */
.stats {
    background: var(--bg-light);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* About Section */
.about {
    background: var(--bg-color);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-image-wrapper {
    width: 320px;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: var(--transition-slow);
    border: 4px solid rgba(255, 255, 255, 0.9);
    background: var(--gradient-primary);
    padding: 4px;
    justify-self: center;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.about-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.about-text {
    width: 100%;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.detail-item {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: var(--transition);
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.detail-item h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.detail-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Skills Section */
.skills {
    background: var(--bg-color);
    padding: 5rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.skill-category-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
}

.skill-category-title svg {
    transition: var(--transition);
    color: var(--secondary-color);
}

.skill-category:hover .skill-category-title svg {
    transform: scale(1.15) rotate(5deg);
    color: var(--highlight-color);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-item {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a4d7a 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow), 0 0 15px rgba(15, 52, 96, 0.4);
    border-color: var(--secondary-color);
}

/* Projects Section */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card .project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
}

.project-card.expanded {
    /* Allow card to grow when expanded */
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-placeholder {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-description-wrapper {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
    margin-bottom: 0.5rem;
}

.project-description-wrapper.expanded {
    max-height: 2000px;
}

.project-description-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.project-description-wrapper.expanded::after {
    opacity: 0;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

.project-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.project-expand-btn:hover {
    color: var(--highlight-color);
}

.project-expand-btn.expanded .expand-icon {
    transform: rotate(180deg);
}

.expand-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.project-tags {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.65rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

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

.tag:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a4d7a 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

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

.project-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: #2980b9;
    transform: translateX(5px);
}

/* Project Publications */
.project-publications {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.project-publications-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-publications-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-publications-list li {
    margin: 0;
}

.project-publication-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-publication-link:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.project-publication-link:hover .publication-venue-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.project-publications-wrapper {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
    margin-bottom: 0.5rem;
}

.project-publications-wrapper.expanded {
    max-height: 3000px; /* Sufficiently large to show all content */
}

.project-publications-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.project-publications-wrapper.expanded::after {
    opacity: 0;
}

.project-publications-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    transition: var(--transition);
    font-family: inherit;
}

.project-publications-expand-btn:hover {
    color: var(--highlight-color);
}

.project-publications-expand-btn.expanded .publications-expand-icon {
    transform: rotate(180deg);
}

.publications-expand-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.publication-venue-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    align-self: flex-start;
    transition: var(--transition);
}

/* Publications Section */
.publications {
    background: var(--bg-color);
}

.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.publication-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.publication-item:hover::before {
    transform: scaleY(1);
}

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

.publication-item:hover {
    padding-left: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-hover);
    transform: translateX(5px);
}

.publication-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 80px;
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.publication-item:hover .publication-title {
    color: var(--secondary-color);
}

.publication-authors {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.publication-venue {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.publication-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.publication-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.publication-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Contact Section */
.contact {
    background: var(--bg-light);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.contact-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-item:hover::after {
    transform: scaleX(1);
}

.contact-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
}

.contact-icon-wrapper {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon-wrapper {
    background: var(--secondary-color);
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    color: white;
}

.contact-details h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--secondary-color);
}

.contact-details p {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 50px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.social-link svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.social-link:hover {
    color: white;
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Chess Section */
.chess-section {
    background: var(--bg-light);
    padding: 6rem 0;
}

.chess-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.chess-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.chess-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chess-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.chess-board-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.problem-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.problem-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.difficulty-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.difficulty-badge.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty-badge.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-badge.advanced {
    background: #f8d7da;
    color: #721c24;
}

.difficulty-badge.expert {
    background: #d1ecf1;
    color: #0c5460;
}

.points-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
}

#problemDescription {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1rem;
}

#chessboard {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.chess-board {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chess-row {
    display: flex;
}

.chess-square {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    transition: var(--transition);
}

.chess-square.light {
    background: #f0d9b5;
}

.chess-square.dark {
    background: #b58863;
}

.chess-square.selected {
    background: rgba(15, 52, 96, 0.3) !important;
    box-shadow: inset 0 0 0 3px var(--secondary-color);
}

.chess-square.possible-move {
    background: rgba(102, 126, 234, 0.3) !important;
}

.chess-square.possible-move::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    opacity: 0.6;
}

.chess-square.has-piece.possible-move::after {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 3px solid var(--secondary-color);
    background: transparent;
}

.chess-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.chess-controls .btn {
    flex: 1;
    min-width: 120px;
}

.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.feedback.hint {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    display: block;
}

.chess-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.level-selector {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.level-selector h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.level-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.level-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-transform: capitalize;
    text-align: left;
}

.level-btn:hover {
    border-color: var(--secondary-color);
    background: var(--bg-light);
}

.level-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.problem-list {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-height: 600px;
    overflow-y: auto;
}

.problem-list h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.problem-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.problem-list-item {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.problem-list-item:hover {
    background: var(--bg-light);
    border-color: var(--secondary-color);
}

.problem-list-item.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.problem-list-item.solved {
    background: #d4edda;
    border-color: #c3e6cb;
}

.problem-list-item.solved.active {
    background: var(--secondary-color);
    color: white;
}

.problem-number {
    font-weight: 600;
    min-width: 40px;
}

.problem-level-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.problem-level-badge.beginner {
    background: #d4edda;
    color: #155724;
}

.problem-level-badge.intermediate {
    background: #fff3cd;
    color: #856404;
}

.problem-level-badge.advanced {
    background: #f8d7da;
    color: #721c24;
}

.problem-level-badge.expert {
    background: #d1ecf1;
    color: #0c5460;
}

.problem-points {
    margin-left: auto;
    font-weight: 600;
    color: var(--secondary-color);
}

.problem-list-item.active .problem-points {
    color: white;
}

.solved-check {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

.problem-list-item.active .solved-check {
    color: white;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--highlight-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes for scroll-triggered animations */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .section-title {
        font-size: 2rem;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 0;
        overflow-y: visible;
    }

    .sidebar-content {
        padding: 1.5rem;
        gap: 2rem;
    }

    .sidebar-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .sidebar-name {
        font-size: 1.5rem;
    }

    .sidebar-title {
        font-size: 0.9rem;
    }

    .sidebar-subtitle {
        font-size: 0.85rem;
    }

    .sidebar-contact {
        gap: 0.75rem;
    }

    .sidebar-contact-item {
        font-size: 0.85rem;
    }

    .sidebar-social {
        padding-top: 1.5rem;
        gap: 0.75rem;
    }

    .sidebar-social-link {
        width: 36px;
        height: 36px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .navbar {
        position: sticky;
        top: 0;
        z-index: 998;
    }

    .navbar .container {
        padding: 1rem 1.5rem;
    }

    .nav-menu {
        gap: 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
        width: 100%;
    }

    .project-publications-wrapper {
        max-height: 200px;
    }

    .project-publications-expand-btn {
        font-size: 0.85rem;
    }

    .hero {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-intro {
        font-size: 1.25rem;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-tagline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tagline-separator {
        display: none;
    }

    .tagline-line {
        font-size: 1.1rem;
        padding: 0.4rem 0.9rem;
    }

    .hero-description {
        font-size: 1.25rem;
        max-width: 100%;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-item {
        padding: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        margin: 0;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .publication-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .publication-item:hover {
        padding-left: 1.5rem;
        transform: none;
    }

    .publication-year {
        min-width: auto;
        font-size: 1.1rem;
    }

    .publication-title {
        font-size: 1.1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-item {
        padding: 1.5rem;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .social-link {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .section-title svg {
        width: 24px;
        height: 24px;
    }

    .chess-main {
        grid-template-columns: 1fr;
    }

    .chess-sidebar {
        order: -1;
    }

    .chess-square {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }

    .chess-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-value {
        font-size: 2rem;
    }

    .chess-board-container {
        padding: 1.5rem;
    }

    .problem-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .sidebar-content {
        padding: 1rem;
    }

    .sidebar-image-wrapper {
        width: 120px;
        height: 120px;
    }

    .sidebar-name {
        font-size: 1.25rem;
    }

    .sidebar-title {
        font-size: 0.85rem;
    }

    .sidebar-subtitle {
        font-size: 0.8rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content {
        padding: 0;
    }

    .hero-intro {
        font-size: 1.1rem;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .tagline-line {
        font-size: 0.95rem;
        padding: 0.35rem 0.75rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-cta .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title svg {
        width: 20px;
        height: 20px;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .publication-title {
        font-size: 1rem;
    }

    .publication-authors,
    .publication-venue {
        font-size: 0.85rem;
    }

    .contact-item {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .contact-icon-wrapper {
        margin: 0 auto;
    }

    section {
        padding: 3rem 0;
    }

    .btn {
        min-height: 44px; /* Touch-friendly size */
        padding: 0.75rem 1.5rem;
    }

    .chess-main {
        grid-template-columns: 1fr;
    }

    .chess-sidebar {
        order: -1;
    }

    .chess-square {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .chess-stats {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2rem;
    }

    .project-expand-btn,
    .project-publications-expand-btn {
        min-height: 44px;
        padding: 0.75rem 0;
    }

    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.55rem;
        border-radius: 10px;
    }

    .project-tags {
        gap: 0.35rem;
    }

    .project-image {
        height: 180px;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .hero-decoration {
        display: none; /* Hide decorative elements on very small screens */
    }
}

