/* Base Styles and Variables */
:root {
    /* Main color palette */
    --primary-color: #ff0000; /* Slightly less saturated teal for better readability */
    --primary-dark: #ff0000; /* Darker shade for hover states */
    --primary-light: #ff0000; /* Lighter shade for accents */
    
    /* Secondary colors */
    --secondary-color: #000000; /* Blue */
    --secondary-dark: #000000; /* Darker blue */
    --secondary-light: #000000; /* Lighter blue */
    
    /* Accent colors */
    --accent-color: #ff0000; /* Red accent */
    --accent-dark: #e61a4d; /* Darker red */
    --accent-light: #ff0000; /* Lighter red */
    
    /* Additional accent for variety */
    --accent-purple: #9c6eff; /* Purple accent */
    
    /* Background colors */
    --dark-color: #0a0a14;
    --darker-color: #050510;
    --dark-gradient: linear-gradient(135deg, var(--dark-color) 0%, var(--darker-color) 100%);
    
    /* Text colors */
    --light-color: #ffffff;
    --light-muted: #c0c0c0; /* For secondary text */
    
    /* Typography */
    --font-main: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'Space Mono', 'Consolas', 'Courier New', monospace;
    --font-heading: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    
    /* Effects */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --glow: 0 0 15px;
    
    /* Animation */
    --loading-duration: 3s; /* Duration for the loading animation */
}

.certifications h3{
    text-align: center;
}

.education h3{
    text-align: center;
}

/* Minimal Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darker-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.minimal-logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
    text-transform: uppercase;
}

.minimal-logo::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.loading-bar {
    width: 60px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.4s ease forwards 0.2s;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: loadingProgress 1s ease infinite;
}

/* Minimal Loading Screen Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loadingProgress {
    0% {
        left: -30%;
    }
    100% {
        left: 100%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--darker-color);
    color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Glitch Overlay */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* Cyber Grid */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 255, 170, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 255, 170, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -2;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
    opacity: 1; /* Make all sections visible by default */
    transform: translateY(0); /* No transform by default */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Add animation classes that will be applied via JavaScript */
section.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
}

section.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Add specific padding for the about section to prevent overlap */
#about {
    padding-top: 150px;
    margin-top: 50px;
}

/* Add specific padding for the about section to prevent overlap */
section#about {
    padding-top: 150px;
    margin-top: 50px;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    z-index: 1000;
    background: rgba(5, 5, 16, 0.95); /* More opaque for better readability */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari support */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4); /* Enhanced shadow for better visibility */
}

header.scrolled {
    padding: 12px 0;
    background: rgba(5, 5, 16, 0.98);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
    padding: 8px;
    border-radius: 5px;
    outline: none;
}

.mobile-menu-toggle:hover {
    color: var(--light-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo-text:hover {
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.logo-text:hover::after {
    transform: scaleX(1);
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 1; /* Ensure menu items are visible by default */
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
    display: inline-block;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .logo-text {
        font-size: 20px;
        letter-spacing: 0.5px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 20, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1000;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        font-size: 18px;
        padding: 12px;
        display: block;
        width: 100%;
        border-radius: 5px;
        color: var(--light-color);
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    nav ul li a:hover,
    nav ul li a.active {
        background-color: rgba(0, 255, 170, 0.1);
        color: var(--primary-color);
    }
    
    /* Show the menu when active */
    nav.active {
        right: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    /* Ensure menu items are visible */
    nav.active ul li {
        animation: fadeInRight 0.5s ease forwards;
        animation-delay: calc(0.1s * var(--item-index, 0));
        animation-fill-mode: both; /* Ensure animation properties are retained */
        opacity: 0; /* Start with opacity 0 for animation */
        transform: translateX(20px); /* Start with transform for animation */
        display: block; /* Explicitly set display to block */
        visibility: visible; /* Explicitly set visibility to visible */
    }
    
    /* Make sure links inside menu items are visible */
    nav.active ul li a {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Desktop Navigation Styles */
@media (min-width: 769px) {
    nav {
        display: block;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    
    nav ul {
        display: flex;
        flex-direction: row;
    }
    
    nav ul li {
        margin-left: 30px;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px; /* Add padding to prevent content from being hidden behind status bar */
    padding-bottom: 50px; /* Add padding at bottom to prevent content from being cut off */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 229, 160, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(10, 132, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at center, rgba(10, 10, 20, 0.5) 0%, rgba(5, 5, 16, 0.9) 100%);
    z-index: -1;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.hero-text::before {
    content: '<>';
    position: absolute;
    top: -40px;
    left: -20px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.hero-text::after {
    content: '</>';
    position: absolute;
    bottom: -40px;
    right: -20px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--light-color);
    position: relative;
    background: linear-gradient(to right, var(--light-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--light-color);
    letter-spacing: 3px;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.3);
    transition: text-shadow 0.3s ease;
}

.glitch:hover {
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.6), 0 0 20px rgba(0, 255, 170, 0.4);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: var(--primary-color);
    z-index: -1;
    animation: glitch-effect 3s infinite;
}

.glitch::after {
    color: var(--accent-color);
    z-index: -2;
    animation: glitch-effect 2s infinite reverse;
}

.glitching::before {
    animation: glitch-effect 0.3s infinite;
}

.glitching::after {
    animation: glitch-effect 0.2s infinite reverse;
}

/* Typewriter Effect */
.typewriter {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    height: 2rem;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(240, 240, 240, 0.8);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -2;
    border-radius: 7px;
    opacity: 0;
    transition: all 0.4s ease;
}

.primary-btn {
    color: var(--darker-color);
    border: none;
}

.primary-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(0, 255, 170, 0.4);
}

.primary-btn:hover::before {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.primary-btn:hover::after {
    opacity: 0.5;
    animation: borderPulse 2s infinite;
}

.primary-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 5px 15px rgba(0, 255, 170, 0.3);
}

.secondary-btn {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.secondary-btn::before {
    opacity: 0;
}

.secondary-btn:hover {
    color: var(--darker-color);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(0, 255, 170, 0.3);
    border-color: transparent;
}

.secondary-btn:hover::before {
    opacity: 1;
}

.secondary-btn:hover::after {
    opacity: 0.5;
    animation: borderPulse 2s infinite;
}

.secondary-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 5px 15px rgba(0, 255, 170, 0.2);
}

.btn-icon {
    margin-left: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(3px);
}

.hero-social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.hero-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgb(235, 0, 0);
    position: relative;
    overflow: hidden;
}

.hero-social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hero-social-link:hover {
    transform: translateY(-5px);
    color: var(--darker-color);
    border-color: transparent;
}

.hero-social-link:hover::before {
    opacity: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-container {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-container:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.cyber-circle {
    width: 380px;
    height: 380px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 0 0 2px rgba(0, 229, 160, 0.1),
        0 0 0 6px rgba(0, 229, 160, 0.05),
        var(--shadow-md);
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.8) 0%, rgba(5, 5, 16, 0.9) 100%);
}

.cyber-circle:hover {
    box-shadow: 
        0 0 0 2px rgba(0, 229, 160, 0.2),
        0 0 0 6px rgba(0, 229, 160, 0.1),
        0 0 30px rgba(0, 229, 160, 0.3),
        var(--shadow-lg);
    transform: translateY(-10px);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1.05) contrast(1.05) saturate(1.1);
    clip-path: polygon(
        0% 0%, 
        100% 0%, 
        100% 85%, 
        85% 100%, 
        0% 100%
    );
}

.profile-pic:hover {
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
}

.cyber-circle::before,
.cyber-circle::after {
    content: '';
    position: absolute;
    z-index: 4;
}

.cyber-circle::before {
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid var(--primary-color);
    opacity: 0.5;
    border-radius: 12px;
    animation: borderPulse 3s infinite;
}

.cyber-circle::after {
    width: 100px;
    height: 100px;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, transparent 0%, var(--primary-color) 100%);
    opacity: 0.15;
    clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
}

.cyber-circle:hover::before {
    border-width: 3px;
    box-shadow: 0 0 25px rgba(0, 255, 170, 0.5);
    animation-duration: 10s;
}

.cyber-circle:hover::after {
    border-width: 3px;
    animation-duration: 15s;
}

.cyber-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 170, 0.3) 0%, rgba(10, 132, 255, 0.1) 50%, transparent 70%);
    filter: blur(15px);
    animation: enhanced-pulse 5s ease-in-out infinite;
    z-index: 1;
    transition: all 0.5s ease;
}

.profile-container:hover .cyber-glow {
    width: 520px;
    height: 520px;
    filter: blur(20px);
    background: radial-gradient(circle, rgba(0, 255, 170, 0.4) 0%, rgba(10, 132, 255, 0.2) 50%, transparent 70%);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    color: var(--light-color);
    transition: all 0.5s ease;
    animation: neonGlow 3s ease-in-out infinite;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: all 0.5s ease;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

section:hover .section-title::before {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.5;
}

/* About Section */
.about {
    background-color: rgba(10, 10, 20, 0.5);
    position: relative;
}

.about-content {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.education, .certifications {
    margin-top: 30px;
}

.education h3, .certifications h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.education-item {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.education-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.cert-list {
    list-style: none;
}

.cert-list li {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    position: relative;
    transition: var(--transition);
}

.cert-list li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

/* Removed green tick marks */

.cert-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    background: rgba(10, 10, 20, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.cert-link i {
    margin-right: 5px;
    font-size: 0.9rem;
}

.cert-link:hover {
    background: rgba(0, 255, 170, 0.15);
    color: var(--light-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

.cert-link:active {
    transform: scale(0.98);
}

/* Experience Section */
.experience {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-content {
    position: relative;
    width: 80%; /* Make all timeline content boxes the same width */
    max-width: 700px;
    min-height: 250px; /* Set minimum height for consistency */
    padding: 30px;
    background: rgba(10, 10, 20, 0.8);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 255, 170, 0.1);
    border-left: 3px solid var(--primary-color);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.timeline-content {
    margin: 0 auto; /* Center the content */
}

.timeline-content:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 170, 0.3);
    background: rgba(15, 15, 30, 0.95);
    border-left: 4px solid var(--primary-color);
    z-index: 3;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--light-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Projects Section */
.projects {
    background-color: rgba(10, 10, 20, 0.5);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    opacity: 1; /* Make cards visible by default */
}

.project-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 255, 170, 0.2);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: all 0.5s ease;
}

.project-card:hover::before {
    opacity: 0.5;
    animation: borderPulse 2s infinite;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--light-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-link i {
    margin-right: 5px;
}

.project-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: default;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--skill-index) * 0.05s);
}

.skill-item:hover {
    background: rgba(0, 255, 170, 0.1);
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 255, 170, 0.3);
    color: var(--primary-color);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 255, 170, 0.1), rgba(10, 132, 255, 0.1));
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-item:hover::before {
    transform: scaleX(1);
}

.skill-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.skill-item:hover::after {
    transform: scaleX(1);
}

/* Contact Section */
.contact {
    background-color: rgba(10, 10, 20, 0.5);
    padding: 80px 0;
}

.contact-content {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(10, 10, 20, 0.3);
}

/* Custom scrollbar for webkit browsers */
.contact-info::-webkit-scrollbar {
    height: 6px;
}

.contact-info::-webkit-scrollbar-track {
    background: rgba(10, 10, 20, 0.3);
    border-radius: 10px;
}

.contact-info::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.contact-info::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.contact-card {
    background: rgba(10, 10, 20, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 170, 0.2);
    padding: 20px;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    height: 250px;
    margin: 5px;
    flex-shrink: 0;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.7;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 255, 170, 0.2);
    border-color: var(--primary-color);
    background: rgba(15, 15, 30, 0.8);
}

.contact-card:hover::before {
    height: 7px;
    opacity: 1;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 255, 170, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 170, 0.3);
}

/* Phone specific styles */
.phone-icon {
    background: rgba(76, 217, 100, 0.1);
    border-color: rgba(76, 217, 100, 0.4);
}
.phone-icon i {
    color: #4cd964;
}
.phone-card:hover .phone-icon {
    background: linear-gradient(135deg, #4cd964, #2ecc71);
}
.phone-btn {
    border-color: #4cd964;
    color: #4cd964;
}
.phone-btn:hover {
    background: linear-gradient(90deg, #4cd964, #2ecc71);
}

/* Email specific styles */
.email-icon {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.4);
}
.email-icon i {
    color: #ff9500;
}
.email-card:hover .email-icon {
    background: linear-gradient(135deg, #ff9500, #ff5e3a);
}
.email-btn {
    border-color: #ff9500;
    color: #ff9500;
}
.email-btn:hover {
    background: linear-gradient(90deg, #ff9500, #ff5e3a);
}

/* GitHub specific styles */
.github-icon {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}
.github-icon i {
    color: #ffffff;
}
.github-card:hover .github-icon {
    background: linear-gradient(135deg, #ffffff, #c0c0c0);
}
.github-btn {
    border-color: #ffffff;
    color: #ffffff;
}
.github-btn:hover {
    background: linear-gradient(90deg, #ffffff, #c0c0c0);
}

/* LinkedIn specific styles */
.linkedin-icon {
    background: rgba(10, 102, 194, 0.1);
    border-color: rgba(10, 102, 194, 0.4);
}
.linkedin-icon i {
    color: #0a66c2;
}
.linkedin-card:hover .linkedin-icon {
    background: linear-gradient(135deg, #0a66c2, #0077b5);
}
.linkedin-btn {
    border-color: #0a66c2;
    color: #0a66c2;
}
.linkedin-btn:hover {
    background: linear-gradient(90deg, #0a66c2, #0077b5);
}

/* Twitter specific styles */
.twitter-icon {
    background: rgba(29, 161, 242, 0.1);
    border-color: rgba(29, 161, 242, 0.4);
}
.twitter-icon i {
    color: #1da1f2;
}
.twitter-card:hover .twitter-icon {
    background: linear-gradient(135deg, #1da1f2, #0084b4);
}
.twitter-btn {
    border-color: #1da1f2;
    color: #1da1f2;
}
.twitter-btn:hover {
    background: linear-gradient(90deg, #1da1f2, #0084b4);
}

.contact-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 1px dashed var(--primary-color);
    animation: rotate 20s linear infinite;
    opacity: 0.5;
}

.contact-card:hover .contact-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(1.1) rotate(5deg);
}

.contact-card:hover .contact-icon i {
    color: var(--darker-color);
}

.contact-icon i {
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.contact-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.contact-card p {
    font-size: 14px;
    color: var(--light-color);
    margin-bottom: 20px;
    opacity: 0.8;
}

.contact-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.contact-action-btn span {
    margin-right: 8px;
}

.contact-action-btn:hover {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--darker-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 170, 0.3);
}

.contact-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
}

.contact-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    font-size: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 170, 0.3);
}

.contact-social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--darker-color);
    transform: translateY(-5px) rotate(10deg);
    border-color: transparent;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-color);
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.social-link:hover {
    color: var(--darker-color);
    transform: translateY(-10px) scale(1.1);
    border-color: transparent;
    box-shadow: 0 15px 25px rgba(0, 255, 170, 0.3);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-link:hover i {
    transform: scale(1.2);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.contact-form form:hover {
    border-color: rgba(0, 255, 170, 0.3);
    box-shadow: 0 5px 15px rgba(0, 255, 170, 0.1);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--light-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.form-group input:focus ~ .form-highlight,
.form-group textarea:focus ~ .form-highlight {
    width: 100%;
}

/* Footer */
footer {
    padding: 30px 0;
    background-color: var(--darker-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--darker-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 255, 170, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 255, 170, 0.6);
}

#back-to-top:active {
    transform: translateY(-2px);
}

/* Touch Device Enhancements */
.touch-active {
    transform: scale(0.95) !important;
    opacity: 0.9;
    transition: transform 0.1s ease !important;
}

.touch-device .btn:hover,
.touch-device .hero-social-link:hover,
.touch-device .social-link:hover,
.touch-device .project-link:hover {
    transform: none;
}

.touch-device .btn:active,
.touch-device .hero-social-link:active,
.touch-device .social-link:active,
.touch-device .project-link:active {
    transform: scale(0.95);
}

/* Enhanced Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes enhanced-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
        box-shadow: 0 0 25px rgba(0, 255, 170, 0.5);
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-15px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes glitch-effect {
    0% {
        transform: translate(0);
        text-shadow: 0 0 0 rgba(0, 255, 170, 0);
    }
    20% {
        transform: translate(-3px, 3px);
        text-shadow: 2px 0 0 rgba(255, 0, 0, 0.5), -2px 0 0 rgba(0, 255, 255, 0.5);
    }
    40% {
        transform: translate(-3px, -3px);
        text-shadow: 2px 0 0 rgba(255, 0, 0, 0.5), -2px 0 0 rgba(0, 255, 255, 0.5);
    }
    60% {
        transform: translate(3px, 3px);
        text-shadow: 2px 0 0 rgba(0, 255, 255, 0.5), -2px 0 0 rgba(255, 0, 0, 0.5);
    }
    80% {
        transform: translate(3px, -3px);
        text-shadow: 2px 0 0 rgba(0, 255, 255, 0.5), -2px 0 0 rgba(255, 0, 0, 0.5);
    }
    100% {
        transform: translate(0);
        text-shadow: 0 0 0 rgba(0, 255, 170, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes borderPulse {
    0% {
        border-color: rgba(0, 255, 170, 0.3);
        box-shadow: 0 0 0 rgba(0, 255, 170, 0);
    }
    50% {
        border-color: rgba(0, 255, 170, 0.8);
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
    }
    100% {
        border-color: rgba(0, 255, 170, 0.3);
        box-shadow: 0 0 0 rgba(0, 255, 170, 0);
    }
}

@keyframes neonGlow {
    0% {
        text-shadow: 0 0 5px rgba(0, 255, 170, 0.5), 0 0 10px rgba(0, 255, 170, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 255, 170, 0.8), 0 0 30px rgba(0, 255, 170, 0.5);
    }
    100% {
        text-shadow: 0 0 5px rgba(0, 255, 170, 0.5), 0 0 10px rgba(0, 255, 170, 0.3);
    }
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 1200px) and (min-width: 993px) {
    .contact-info {
        flex-wrap: nowrap;
    }
    
    .contact-card {
        width: 190px;
    }
}

@media screen and (max-width: 1200px) {
    .container {
        width: 95%;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .profile-container {
        width: 400px;
        height: 400px;
    }

    .cyber-circle {
        width: 360px;
        height: 360px;
    }

    .cyber-glow {
        width: 400px;
        height: 400px;
    }
}

@media screen and (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .contact-info {
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: center;
    }
    
    .contact-card {
        width: calc(33.33% - 20px);
        min-width: auto;
        margin: 10px;
    }

    .hero-text {
        margin-top: 40px;
        max-width: 100%;
    }

    .cta-buttons, .hero-social-links {
        justify-content: center;
    }

    .profile-container {
        margin: 0 auto;
    }

    /* Responsive timeline content */
    .timeline-content {
        width: 90%; /* Slightly wider on smaller screens */
    }

    .about-content {
        flex-direction: column;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .contact-content {
        flex-direction: column;
    }

    .contact-info {
        margin-bottom: 40px;
    }
}

@media screen and (max-width: 768px) {
    header {
        padding: 15px 0;
    }

    header .container {
        width: 95%;
    }

    /* Removed conflicting styles */

    nav ul li {
        margin: 15px 0;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: block;
        font-size: 24px;
        color: var(--primary-color);
        cursor: pointer;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Fix for hero section on mobile */
    .hero {
        padding-top: 120px; /* Increased padding to prevent name from being hidden */
        padding-bottom: 80px; /* Ensure enough space at bottom */
        height: auto; /* Allow the section to expand as needed */
        min-height: 100vh;
    }

    .hero-content {
        margin-bottom: 30px; /* Add space between hero content and next section */
    }

    .hero-text h1 {
        font-size: 2.8rem;
        margin-top: 20px; /* Add space at the top */
    }

    .typewriter {
        font-size: 1.2rem;
        height: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    /* Fix for about section to prevent overlap */
    #about {
        padding-top: 100px;
        margin-top: 30px;
    }

    .skills-grid, .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-container {
        width: 320px;
        height: 320px;
        margin-bottom: 40px; /* Add space below profile picture */
    }

    .cyber-circle {
        width: 280px;
        height: 280px;
    }

    .cyber-glow {
        width: 320px;
        height: 320px;
    }

    .timeline-content {
        padding: 20px;
        min-height: 200px; /* Smaller minimum height on smaller screens */
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    /* Contact section responsive styles */
    .contact-content {
        padding: 10px 0;
    }

    .contact-info {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 20px;
        justify-content: center;
        gap: 15px;
    }
    
    .contact-info::-webkit-scrollbar {
        display: none;
    }
    
    .contact-info {
        scrollbar-width: none;
    }
    
    .contact-card {
        width: calc(50% - 15px);
        min-width: auto;
        margin: 0;
    }

    .contact-form {
        order: 1;
    }

    .contact-form form {
        padding: 20px;
    }

    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    /* Adjust loading screen for smallest screens */
    .minimal-logo {
        font-size: 24px;
    }
    
    /* Further adjustments for smallest screens */
    .hero {
        padding-top: 130px; /* Even more padding for smallest screens */
        padding-bottom: 100px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
        margin-top: 30px; /* More space at top for smallest screens */
    }

    .typewriter {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .profile-container {
        width: 280px;
        height: 280px;
        margin-bottom: 50px; /* More space below profile on smallest screens */
    }
    
    /* Enhanced contact section for smallest screens */
    .contact-card {
        padding: 15px;
        height: auto;
        min-height: 200px;
        width: 100%;
        max-width: 250px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    .contact-icon i {
        font-size: 18px;
    }
    
    .contact-card h3 {
        font-size: 16px;
    }
    
    .contact-card p {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .contact-action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    }

    .cyber-circle {
        width: 240px;
        height: 240px;
    }

    .cyber-glow {
        width: 280px;
        height: 280px;
    }

    /* Fix for section spacing on smallest screens */
    #about {
        padding-top: 80px;
        margin-top: 40px;
    }

    .hero-social-links {
        gap: 10px;
    }

    .hero-social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Timeline content for smallest screens */
    .timeline-content {
        width: 95%;
        padding: 20px;
    }

    .education-item, .cert-list li {
        padding: 15px 10px;
    }

    /* Enhanced contact section for smallest screens */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .contact-form form {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .social-links {
        gap: 10px;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    footer {
        padding: 20px 0;
        font-size: 0.8rem;
    }

@keyframes glitch-effect {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-3px, 3px);
    }
    40% {
        transform: translate(-3px, -3px);
    }
    60% {
        transform: translate(3px, 3px);
    }
    80% {
        transform: translate(3px, -3px);
    }
    100% {
        transform: translate(0);
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }

    /* Ensure navigation menu is visible on mobile */
    nav ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

