/* Global Responsive Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem calculations */
}

/* Responsive font scaling */
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    html {
        font-size: 13px;
    }
}

body {
    font-family: 'Inter', 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 100vh;
    position: relative;
}

/* Prevent content from going under fixed navbar */
body {
    padding-top: 80px; /* Default navbar height */
}

@media (max-width: 900px) {
    body {
        padding-top: 70px; /* Smaller navbar on tablets */
    }
}

@media (max-width: 500px) {
    body {
        padding-top: 60px; /* Even smaller on mobile */
    }
}

/* Arabic Font Support */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Tajawal:wght@300;400;500;700;800&family=Amiri:wght@400;700&display=swap');

/* Global Section Styles - Prevent Overlapping */
section {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    clear: both;
    overflow-x: hidden;
    min-height: auto;
}

/* Ensure all elements are properly contained */
*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Prevent images and media from overflowing */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Flexible containers */
.section {
    padding: 5rem 0;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 500px) {
    .section {
        padding: 3rem 0;
    }
}

/* Additional responsive utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    width: 100%;
    box-sizing: border-box;
}

.col {
    flex: 1;
    padding: 0 15px;
    box-sizing: border-box;
    min-width: 0; /* Prevent flex items from overflowing */
}

@media (max-width: 900px) {
    .row {
        margin: 0 -10px;
    }
    
    .col {
        padding: 0 10px;
    }
}

@media (max-width: 500px) {
    .row {
        margin: 0 -5px;
    }
    
    .col {
        padding: 0 5px;
    }
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Ensure buttons don't overflow */
.btn, button {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive images and media */
.responsive-media {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* Prevent horizontal scroll */
.no-scroll-x {
    overflow-x: hidden;
    max-width: 100%;
}

/* Safe area for mobile devices */
@supports (padding: max(0px)) {
    .safe-area {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

.arabic-text {
    font-family: 'Cairo', 'Tajawal', 'Inter', sans-serif;
    direction: rtl;
    text-align: right;
}

.english-text {
    font-family: 'Inter', 'Cairo', sans-serif;
    direction: ltr;
    text-align: left;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Container responsive adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        padding: 0 20px;
    }
}

@media (max-width: 900px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 0 10px;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    min-height: 80px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .navbar {
        min-height: 70px;
    }
}

@media (max-width: 500px) {
    .navbar {
        min-height: 60px;
    }
}

.navbar::before {
    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="nav-grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23nav-grid)"/></svg>');
    pointer-events: none;
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(25px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    min-height: inherit;
}

@media (max-width: 900px) {
    .nav-container {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 500px) {
    .nav-container {
        padding: 0.7rem 1rem;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.nav-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-brand-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#navBrandImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
}

#navBrandText {
    position: relative;
    z-index: 2;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-brand h2 {
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.nav-brand-subtitle {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Arabic text support for brand */
.nav-brand-text .arabic-text {
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    direction: rtl;
    text-align: right;
}

.nav-brand-text .english-text {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: left;
}

.nav-brand-subtitle.arabic-text {
    text-transform: none;
    letter-spacing: 0;
}

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

.nav-menu a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-menu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 50%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-menu a:hover::after {
    width: 80%;
}



/* Refresh Button */
.refresh-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: rotate(180deg);
}

.refresh-btn i {
    transition: all 0.3s ease;
}

/* Skill Preview Overlay */
.skill-preview {
    position: fixed;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    max-width: 300px;
    border: 2px solid #2563eb;
    animation: fadeIn 0.3s ease;
    pointer-events: none;
    display: none;
}

.preview-content {
    text-align: center;
}

.preview-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.preview-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.preview-content p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.preview-hint {
    color: #2563eb !important;
    font-weight: 500;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    min-height: calc(100vh - 80px); /* Account for navbar */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .hero {
        min-height: calc(100vh - 70px);
        padding: 100px 0 60px;
    }
}

@media (max-width: 500px) {
    .hero {
        min-height: calc(100vh - 60px);
        padding: 80px 0 40px;
    }
}

.hero::before {
    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="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

@media (max-width: 1200px) {
    .hero-content {
        max-width: 95%;
        gap: 3rem;
    }
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .hero-content {
        gap: 2rem;
    }
}

.hero-text {
    position: relative;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    position: relative;
}

.hero-text h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #94a3b8;
    position: relative;
    padding-left: 1.5rem;
}

.hero-subtitle::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-size: 1rem;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: #cbd5e1;
    line-height: 1.8;
    max-width: 500px;
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    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.2), transparent);
    transition: left 0.6s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1);
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-circle {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    padding: 6px;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
}

.profile-circle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 8s linear infinite;
    opacity: 0.7;
}

.profile-circle::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent, rgba(139, 92, 246, 0.1), transparent);
    border-radius: 50%;
    z-index: -2;
    animation: rotate 12s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.profile-circle:hover .profile-img {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #7c3aed);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* About Section */
.about {
    background: white;
    position: relative;
    overflow: hidden;
}

.about::before {
    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="about-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="1" fill="%23e2e8f0" opacity="0.4"/><circle cx="10" cy="10" r="0.5" fill="%23cbd5e1" opacity="0.3"/><circle cx="50" cy="10" r="0.5" fill="%23cbd5e1" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23about-pattern)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-text {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 3rem;
    margin-bottom: 4rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInUp 0.8s ease-out;
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.about-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 200% 100%;
    animation: gradientMove 4s ease-in-out infinite;
}

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

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

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #475569;
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
    text-justify: inter-word;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text p:first-child::first-letter {
    font-size: 1.4em;
    font-weight: 700;
    color: #3b82f6;
    float: left;
    line-height: 1;
    margin-right: 0.1em;
    margin-top: 0.1em;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    opacity: 1;
    visibility: visible;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .about-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 500px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
}

.stat {
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.stat:nth-child(1) { animation-delay: 0.2s; }
.stat:nth-child(2) { animation-delay: 0.4s; }
.stat:nth-child(3) { animation-delay: 0.6s; }
.stat:nth-child(4) { animation-delay: 0.8s; }

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: left 0.8s ease;
}

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

.stat:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat i {
    font-size: 3rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: block;
    transition: all 0.3s ease;
}

.stat:hover i {
    transform: scale(1.1) rotate(5deg);
}

.stat h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: #64748b;
    font-weight: 500;
    font-size: 1rem;
}

/* Skills Section */
.skills {
    background: #f8fafc;
    position: relative;
    z-index: 1;
    display: block;
    visibility: visible;
    opacity: 1;
}

.skills-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



.skills-grid {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 350px;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .skills-grid {
        max-width: 90%;
        min-height: 320px;
    }
}

@media (max-width: 900px) {
    .skills-grid {
        max-width: 95%;
        min-height: 300px;
        perspective: 800px;
    }
}

@media (max-width: 500px) {
    .skills-grid {
        max-width: 100%;
        min-height: 250px;
        perspective: 600px;
        margin-top: 1.5rem;
    }
}
}

/* Auto-scroll animation for skills */
@keyframes scrollSkills {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.skill-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: absolute;
    overflow: hidden;
    display: block !important;
    visibility: visible !important;
    width: 380px;
    height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

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

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

.skill-card:hover {
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(37, 99, 235, 0.4);
    background: rgba(255, 255, 255, 1);
}

/* New Skill Card Components */
.skill-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    position: relative;
}

@media (max-width: 900px) {
    .skill-card-inner {
        padding: 1.75rem;
    }
}

@media (max-width: 500px) {
    .skill-card-inner {
        padding: 1.5rem;
    }
}

.skill-header {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 500px) {
    .skill-header {
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
}

.skill-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.skill-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 18px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .skill-icon {
        width: 65px;
        height: 65px;
        padding: 9px;
    }
}

@media (max-width: 500px) {
    .skill-icon {
        width: 60px;
        height: 60px;
        padding: 8px;
        border-radius: 16px;
    }
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1));
}

.skill-level-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

.skill-level-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Responsive badge positioning */
@media (max-width: 900px) {
    .skill-level-badge {
        top: 12px;
        right: 12px;
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

@media (max-width: 500px) {
    .skill-level-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 15px;
    }
}

.skill-info {
    flex: 1;
    text-align: left;
}

.skill-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .skill-title {
        font-size: 1.25rem;
        margin-bottom: 0.6rem;
    }
}

@media (max-width: 500px) {
    .skill-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
}

.skill-experience {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-experience i {
    color: #2563eb;
    font-size: 0.8rem;
}

.skill-body {
    flex: 1;
    margin-bottom: 1.5rem;
}

@media (max-width: 500px) {
    .skill-body {
        margin-bottom: 1.25rem;
    }
}

.skill-description {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.skill-features {
    margin-top: 0.75rem;
}

.features-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.feature-more {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 8px;
}

.skill-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.skill-progress {
    flex: 1;
    margin-right: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.progress-fill[data-level="Beginner"] { width: 25%; }
.progress-fill[data-level="Intermediate"] { width: 50%; }
.progress-fill[data-level="Advanced"] { width: 75%; }
.progress-fill[data-level="Expert"] { width: 100%; }

.skill-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.skill-card:hover .skill-action {
    opacity: 1;
    transform: translateX(4px);
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #2563eb;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(37, 99, 235, 0.6);
    transform: scale(1.1);
}

/* Responsive Design for Skills Carousel */
@media (max-width: 900px) {
    .skills-grid {
        min-height: 300px;
        perspective: 800px;
    }
    
    .skill-card {
        width: 340px;
        height: 280px;
    }
    
    .carousel-nav {
        gap: 1rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Timeline Responsive */
    .timeline {
        padding: 2rem 1rem;
    }
    
    .timeline::before {
        left: 30px;
        transform: none;
    }
    
    .timeline-item.timeline-left .timeline-content,
    .timeline-item.timeline-right .timeline-content {
        left: 70px;
        right: 1rem;
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        transform-origin: left center;
    }
    
    .timeline-item.timeline-left .timeline-content::before,
    .timeline-item.timeline-right .timeline-content::before {
        left: -41px;
        right: auto;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timeline-content {
        padding: 2rem;
    }
}

@media (max-width: 500px) {
    .skills-grid {
        min-height: 250px;
    }
    
    .skill-card {
        width: 300px;
        height: 260px;
    }
    
    .skill-card-inner {
        padding: 1rem;
    }
    
    /* Timeline Mobile */
    .timeline {
        padding: 1.5rem 0.75rem;
    }
    
    .timeline::before {
        left: 25px;
    }
    
    .timeline-item.timeline-left .timeline-content,
    .timeline-item.timeline-right .timeline-content {
        left: 65px;
        right: 0.75rem;
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }
    
    .timeline-content {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .timeline-title-group h3 {
        font-size: 1.1rem;
    }
    
    .timeline-date {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    .tech-stack {
        gap: 0.4rem;
        margin-top: 0.5rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    
    /* Education Responsive */
    .education-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0.5rem;
    }
    
    .education-item {
        padding: 2rem;
    }
    
    .education-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .education-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        align-self: center;
    }
    
    .education-content h3 {
        font-size: 1.4rem;
    }
    
    .institution {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
    
    .duration {
        font-size: 0.9rem;
        justify-content: center;
    }
    

}

.skill-level span {
    font-weight: 600;
    color: #2563eb;
}

.skill-level span:nth-child(2) {
    color: #94a3b8;
}

/* Experience Section */
.experience {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.experience::before {
    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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="90" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.timeline {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    overflow: visible;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .timeline {
        max-width: 95%;
    }
}

@media (max-width: 900px) {
    .timeline {
        max-width: 100%;
        padding: 2rem 0.5rem;
    }
}

@media (max-width: 500px) {
    .timeline {
        padding: 1.5rem 0.25rem;
    }
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #3b82f6, #2563eb);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    z-index: 5;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    box-sizing: border-box;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.timeline-left .timeline-content {
    left: 2rem;
    right: 50%;
    margin-right: 2rem;
    transform-origin: right center;
    max-width: 520px;
}

.timeline-item.timeline-left .timeline-content:hover {
    transform: translateY(-8px) scale(1.02) translateX(-5px);
}

.timeline-item.timeline-right .timeline-content {
    right: 2rem;
    left: 50%;
    margin-left: 2rem;
    transform-origin: left center;
    max-width: 520px;
}

.timeline-item.timeline-right .timeline-content:hover {
    transform: translateY(-8px) scale(1.02) translateX(5px);
}

.timeline-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    z-index: 2;
}



.timeline-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.6s ease;
}

.timeline-content:hover::after {
    left: 100%;
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 50%;
    top: 2rem;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    z-index: 15;
}

.timeline-item.timeline-left .timeline-content::before {
    right: -41px;
}

.timeline-item.timeline-right .timeline-content::before {
    left: -41px;
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-title-group h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.timeline-date {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    white-space: nowrap;
}

.timeline-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tech-tag {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

/* Education Section */
.education {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.education::before {
    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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.education-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.education-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.education-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.8s ease;
}

.education-item:hover::before {
    left: 100%;
}

.education-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 60px rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.education-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.education-icon {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: all 0.4s ease;
}

.education-item:hover .education-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

.education-info {
    flex: 1;
}

.education-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.institution {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.duration {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.duration::before {
    content: '📅';
    font-size: 1.1rem;
}

.description {
    color: #64748b;
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.description::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: calc(100% - 1rem);
    background: linear-gradient(180deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

/* Education Gallery Styles */
.education-gallery {
    margin-top: 4rem;
    padding: 0;
}

.gallery-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-container {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 20px;
    background: 
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%),
        rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    perspective: 1400px;
    perspective-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(59, 130, 246, 0.05) 30%, 
        transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    z-index: 1;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-image {
    position: absolute;
    width: 420px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
    transform-origin: center center;
    top: 50%;
    left: 50%;
    margin-top: -140px;
    margin-left: -210px;
}

.gallery-image:hover {
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
    animation-play-state: paused;
}

.gallery-image:hover img {
    transform: scale(1.1);
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-track:hover .gallery-image {
    animation-play-state: paused;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 20px;
}

.gallery-image:hover img {
    transform: scale(1.1);
}

/* 3D depth and lighting effects */
.gallery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    border-radius: 16px;
    z-index: 1;
}

.gallery-image::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(139, 92, 246, 0.2), 
        rgba(59, 130, 246, 0.2));
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image:hover::after {
    opacity: 1;
}

.gallery-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-radius: 0 0 20px 20px;
}

.gallery-image:hover .gallery-image-overlay {
    transform: translateY(0);
}

.gallery-image-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.gallery-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem;
    font-style: italic;
}

.gallery-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(139, 92, 246, 0.5);
}

/* Gallery Navigation Controls */
.gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: rgba(139, 92, 246, 0.8);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
}

.gallery-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: rgba(139, 92, 246, 1);
    transform: scale(1.1);
}

.gallery-indicators {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background: rgba(139, 92, 246, 0.8);
    transform: scale(1.2);
}

.gallery-indicator:hover {
    background: rgba(139, 92, 246, 0.6);
    transform: scale(1.1);
}

/* 3D Cylinder Animation */
@keyframes rotate3D {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Gallery images will be positioned by JavaScript like Skills carousel */

/* Responsive 3D Gallery */
@media (max-width: 900px) {
    .gallery-container {
        height: 400px;
        padding: 2rem;
        perspective: 1000px;
    }
    
    .gallery-image {
        width: 360px;
        height: 240px;
        margin-top: -120px;
        margin-left: -180px;
    }
    
    /* Tablet tilting animation */
    @keyframes tiltToCenterTablet {
        0% {
            transform: rotateY(0deg) translateZ(250px) rotateX(0deg);
        }
        
        12.5% {
            transform: rotateY(45deg) translateZ(250px) rotateX(-12deg) rotateZ(-8deg);
        }
        
        25% {
            transform: rotateY(90deg) translateZ(250px) rotateX(-15deg) rotateZ(-12deg);
        }
        
        37.5% {
            transform: rotateY(135deg) translateZ(250px) rotateX(-12deg) rotateZ(-8deg);
        }
        
        50% {
            transform: rotateY(180deg) translateZ(250px) rotateX(0deg) rotateZ(0deg) scale(0.8);
        }
        
        62.5% {
            transform: rotateY(225deg) translateZ(250px) rotateX(-12deg) rotateZ(8deg);
        }
        
        75% {
            transform: rotateY(270deg) translateZ(250px) rotateX(-15deg) rotateZ(12deg);
        }
        
        87.5% {
            transform: rotateY(315deg) translateZ(250px) rotateX(-12deg) rotateZ(8deg);
        }
        
        100% {
            transform: rotateY(360deg) translateZ(250px) rotateX(0deg) rotateZ(0deg);
        }
    }
    
    .gallery-image {
        animation: tiltToCenterTablet 20s linear infinite;
    }
}

@media (max-width: 500px) {
    .education-gallery {
        margin-top: 3rem;
    }
    
    .gallery-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-container {
        height: 320px;
        padding: 1.5rem;
        perspective: 800px;
    }
    
    .gallery-image {
        width: 300px;
        height: 200px;
        margin-top: -100px;
        margin-left: -150px;
    }
    
    /* Mobile tilting animation */
    @keyframes tiltToCenterMobile {
        0% {
            transform: rotateY(0deg) translateZ(200px) rotateX(0deg);
        }
        
        12.5% {
            transform: rotateY(45deg) translateZ(200px) rotateX(-10deg) rotateZ(-6deg);
        }
        
        25% {
            transform: rotateY(90deg) translateZ(200px) rotateX(-12deg) rotateZ(-8deg);
        }
        
        37.5% {
            transform: rotateY(135deg) translateZ(200px) rotateX(-10deg) rotateZ(-6deg);
        }
        
        50% {
            transform: rotateY(180deg) translateZ(200px) rotateX(0deg) rotateZ(0deg) scale(0.8);
        }
        
        62.5% {
            transform: rotateY(225deg) translateZ(200px) rotateX(-10deg) rotateZ(6deg);
        }
        
        75% {
            transform: rotateY(270deg) translateZ(200px) rotateX(-12deg) rotateZ(8deg);
        }
        
        87.5% {
            transform: rotateY(315deg) translateZ(200px) rotateX(-10deg) rotateZ(6deg);
        }
        
        100% {
            transform: rotateY(360deg) translateZ(200px) rotateX(0deg) rotateZ(0deg);
        }
    }
    
    .gallery-image {
        animation: tiltToCenterMobile 20s linear infinite;
    }
}

/* Contact Section */
.contact {
    background: white;
}

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

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .contact-info {
        gap: 2rem;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 500px) {
    .contact-info {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
    text-align: center;
    position: relative;
}

.contact-item i {
    font-size: 1.8rem;
    color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.3s ease;
}

.contact-item:hover i {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.contact-item.clickable {
    transition: all 0.3s ease;
}

.contact-item.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.15);
}

.contact-item.clickable:active {
    transform: translateY(-2px);
}

.contact-item.clickable::after {
    content: '↗';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1rem;
    color: #3b82f6;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: bold;
}

.contact-item.clickable:hover::after {
    opacity: 1;
    transform: translate(2px, -2px);
}

.contact-item h4 {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.4;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

.social-link.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.social-link.disabled:hover {
    background: #2563eb;
    transform: none;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .modal-content {
        width: 95%;
        max-width: 500px;
        margin: 3% auto;
        max-height: 85vh;
    }
}

@media (max-width: 500px) {
    .modal-content {
        width: 98%;
        max-width: none;
        margin: 2% auto;
        max-height: 90vh;
        border-radius: 0.5rem;
    }
}

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

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #64748b;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    transition: all 0.3s ease;
}

.close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.modal-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.modal-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-info p {
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.skill-details,
.skill-projects {
    margin-bottom: 2rem;
}

.skill-details h4,
.skill-projects h4 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-details ul {
    list-style: none;
    padding: 0;
}

.skill-details li {
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.skill-projects p {
    color: #64748b;
    line-height: 1.6;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.modal-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }
    
    /* Hero Responsive */
    .hero {
        padding: 100px 0 60px;
        min-height: 90vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 1rem;
        margin-bottom: 2rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        padding: 0.875rem 2rem;
        width: 200px;
        justify-content: center;
    }
    
    .profile-circle {
        width: 280px;
        height: 280px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-item {
        min-width: auto;
    }
    
    .contact-item i {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .nav-brand-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .nav-brand h2 {
        font-size: 1.2rem;
    }
    
    .nav-brand-subtitle {
        font-size: 0.7rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        padding: 2rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }
    
    .skill-card {
        width: 320px;
        height: 260px;
    }
    
    .skill-card h3 {
        font-size: 1.2rem;
    }
    
    .skill-card p {
        font-size: 0.85rem;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-circle {
        width: 250px;
        height: 250px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item.timeline-left .timeline-content,
    .timeline-item.timeline-right .timeline-content {
        left: 60px;
        right: 0;
    }
    
    .timeline-item.timeline-left .timeline-content::before,
    .timeline-item.timeline-right .timeline-content::before {
        left: -50px;
    }
    
    .education-item {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    /* Tablet specific adjustments */
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        padding: 1.2rem;
    }
    
    .about-text {
        padding: 2.5rem;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
    
    .contact-info {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 500px) {
    .section-title {
        font-size: 2rem;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-text h1::after {
        width: 60px;
        height: 3px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        padding: 1rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .btn {
        width: 180px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .profile-circle {
        width: 220px;
        height: 220px;
    }
    
    .profile-circle::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
    
    .profile-circle::after {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }
    
    /* About Responsive */
    .about-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .about-text {
        padding: 2rem;
        border-radius: 20px;
        margin-bottom: 3rem;
    }
    
    .about-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.8;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .stat {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .stat i {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .stat h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .stat p {
        font-size: 0.85rem;
    }
    
    /* Additional mobile optimizations */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    /* Navigation Mobile */
    .nav-container {
        padding: 0.8rem 1rem;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
    
    /* Contact Section Mobile */
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .contact-item {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .contact-item h3 {
        font-size: 1.1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    /* Social Media Mobile */
    .social-media {
        padding: 2rem 0;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
