/* Base Styles */
html {
    scroll-behavior: smooth;
}

/* Base styles */
:root {
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
}

body {
    transition: background-color 0.3s ease;
}

body {
    background-color: var(--bg-light);
}

body.dark {
    background-color: var(--bg-dark);
}

/* Tech Items */
.tech-item {
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
    transform-origin: center;
    will-change: transform;
    backface-visibility: hidden;
    z-index: 1;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(209, 213, 219, 0.5);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.dark .tech-item {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.tech-item:hover {
    transform: translateY(-5px);
    z-index: 2;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tech Popup */
.tech-popup {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 20;
    white-space: nowrap;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tech-item:hover .tech-popup {
    opacity: 1;
    visibility: visible;
}

.dark .tech-popup {
    background: #1a202c;
    color: #e2e8f0;
}

.dark-mode {
    background-color: #1a202c;
    color: #cbd5e0;
}

.dark-mode .bg-white {
    background-color: #2d3748;
}

.dark-mode .text-gray-900 {
    color: #cbd5e0;
}

.dark-mode .text-blue-500 {
    color: #63b3ed;
}

.dark-mode .tech-popup {
    background: #1a202c;
    color: #e2e8f0;
}

.dark .tech-popup {
    background: #1a202c;
    color: #e2e8f0;
}

/* Hero Animation */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(99, 102, 241, 0.05) 0%,
        transparent 70%
    );
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.dark .hero::before {
    background: radial-gradient(circle at center,
        rgba(99, 102, 241, 0.1) 0%,
        transparent 70%
    );
}

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

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: #333;
    transition: background-color 0.3s ease;
}

.dark body {
    background-color: var(--bg-dark);
}

header {

    background: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header a, header button {
    color: #1a202c;
}

.dark header a, .dark header button {
    color: #e2e8f0;
}

nav {
    margin: 20px 0;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

.portfolio {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.portfolio-item {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    margin: 10px;
    padding: 15px;
    width: calc(33% - 40px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 20px 0;
    background: #35424a;
    color: #ffffff;
}

@media (max-width: 768px) {
    .tech-item .tech-popup {
        display: none;
    }
    .portfolio-item {
        width: calc(50% - 40px);
    }
}

@media (max-width: 480px) {
    .portfolio-item {
        width: 100%;
    }
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.8);
}

header a {
    color: #1a202c;
    transition: color 0.3s ease;
}

.dark header a {
    color: #e2e8f0;
}

.dark header {
    background: rgba(31, 41, 55, 0.8);
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, #f0f4f8, #d9e2ec);
}

.dark .hero {
    background: linear-gradient(to bottom, #1a202c, #2d3748);
}

.hero h1 {
    color: #1a202c;
}

.dark .hero h1 {
    color: #e2e8f0;
}

.hero p {
    color: #4a5568;
}

.dark .hero p {
    color: #a0aec0;
}

/* About Section */
.about {
    background: rgba(255, 255, 255, 0.8);
}

.dark .about {
    background: rgba(31, 41, 55, 0.8);
}

.about p {
    color: #1a202c;
}

.dark .about p {
    color: #e2e8f0;
}

/* Technologies Section */
.technologies {
    /*background: rgba(255, 255, 255, 0.8);*/
    background: rgba(31, 41, 55, 0);
}

.dark .technologies {
    /*background: rgb(17 24 39 / var(--tw-bg-opacity, 1));*/
    background: rgba(31, 41, 55, 0);
}

.technologies p {
    color: #1a202c;
}

.dark .technologies p {
    color: #e2e8f0;
}

/* Projects Section */
.projects {
    background: rgba(255, 255, 255, 0.8);
}

.dark .projects {
    background: rgba(31, 41, 55, 0.8);
}

.projects p {
    color: #1a202c;
}

.dark .projects p {
    color: #e2e8f0;
}

.projects .project-card {
    background: rgba(255, 255, 255, 0.8);
    transition: background-color 0.3s ease;
}

.dark .projects .project-card {
    background: rgba(31, 41, 55, 0.8);
}

.projects .project-card img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.projects .project-card h3 {
    color: #1a202c;
}

.dark .projects .project-card h3 {
    color: #e2e8f0;
}

.projects .project-card p {
    color: #4a5568;
}

.dark .projects .project-card p {
    color: #a0aec0;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: visible; /* Changed from hidden to show glow */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: -4px; /* Increased from -2px */
    background: linear-gradient(45deg, 
        #ff6b6b,
        #4ecdc4,
        #45b7d1);
    border-radius: 24px; /* Increased from 22px */
    z-index: -1;
    filter: blur(15px); /* Increased from 8px */
    opacity: 0.5; /* Base opacity, was 0 */
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card:hover::before {
    opacity: 1;
    filter: blur(20px);
}

.dark .project-card::before {
    background: linear-gradient(45deg, 
        #6366f1,
        #3b82f6,
        #06b6d4);
    opacity: 0.7; /* Increased base opacity for dark mode */
}

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

.swiper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.swiper-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.swiper-pagination-bullet {
    background: var(--accent-color-2);
}

.dark .swiper-pagination-bullet {
    background: #3b82f6;
}

.project-content {
    padding: 1rem;
    color: #1a202c;
}

.dark .project-content {
    color: #e2e8f0;
}

/* Contact Section */
.contact {
    background: rgba(255, 255, 255, 0.8);
}

.dark .contact {
    background: rgba(31, 41, 55, 0.8);
}

.contact p {
    color: #1a202c;
}

.dark .contact p {
    color: #e2e8f0;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
}

.dark footer {
    background: rgba(31, 41, 55, 0.8);
}

footer p {
    color: #1a202c;
}

.dark footer p {
    color: #e2e8f0;
}

/* Dark mode transitions */
body, html {
    transition: background-color 0.3s ease;
}

.tech-item i {
    color: #4B5563;
    transition: color 0.3s ease;
}

.tech-item span {
    color: #1a202c;
    transition: color 0.3s ease;
}

.dark .tech-item {
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
                0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.dark .tech-item i,
.dark .tech-item span {
    color: #e2e8f0;
}

/* CSS Variables */
:root {
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
    --z-hover: 30;
}

/* Projects Container */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.project-card.visible {
    transform: translateX(0);
    opacity: 1;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    z-index: 1;
}

.timeline-item {
    padding: 30px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 2;
}

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

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 32px;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    z-index: 5;
    transition: all 0.5s ease;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5),
                inset 0 0 15px rgba(255, 255, 255, 0.5);
}

.dark .timeline-item::after {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5),
                inset 0 0 15px rgba(31, 41, 55, 0.5);
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.right::after {
    left: -8px;
    transform: translateY(-50%) scaleX(-1);
}

.timeline-item:hover::after {
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    transform: translateY(-50%) translateX(5px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.7),
                inset 0 0 20px rgba(255, 255, 255, 0.7);
}

.dark .timeline-item:hover::after {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.7),
                inset 0 0 20px rgba(31, 41, 55, 0.7);
}

.timeline-content {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: transform 0.3s ease;
    z-index: 2;
}

.dark .timeline-content {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: none;
    border-color: rgba(59, 130, 246, 0.2);
}

.timeline-content h3 {
    color: #1a202c;
}

.dark .timeline-content h3 {
    color: #f3f4f6;
}

.timeline-content p,
.timeline-content li {
    color: #4a5568;
}

.dark .timeline-content p,
.dark .timeline-content li {
    color: #e5e7eb;
}

.timeline-content p,
.timeline-content ul,
.timeline-content .achievement {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 999px;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Scroll Offset */
.scroll-offset {
    padding-top: 10rem;
    margin-top: -4rem;
}

/* Info Icon and Tooltip */
.info-icon {
    font-size: 1rem;
    color: #3b82f6;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.tooltip-text {
    visibility: visible;
    width: 150px;
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .tooltip-text {
    background-color: rgba(17, 24, 39, 0.9);
    color: #e5e7eb;
}

/* Tech Section Header */
.tech-section-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-info-container {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(4px);
    gap: 0.5rem;
}

/* Halo Effect */
.halo-effect {
    position: relative;
    z-index: 1;
}

.halo-effect::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.1), rgba(0, 0, 255, 0.3));
    border-radius: 20px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.7;
    transition: transform 0.1s ease, background 0.3s ease;
}

@keyframes halo {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

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

@keyframes float {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-50%) translateX(3px);
    }
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes floatRight {
    0% {
        transform: translateY(-50%) translateX(0) scaleX(-1);
    }
    50% {
        transform: translateY(-50%) translateX(-3px) scaleX(-1);
    }
    100% {
        transform: translateY(-50%) translateX(0) scaleX(-1);
    }
}

/* Responsive Timeline */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item.right {
        left: 0;
    }
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 23px;
    }
    .timeline-content {
        background: rgba(255, 255, 255, 1);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .dark .timeline-content {
        background: rgba(31, 41, 55, 1);
    }
}

/* Timeline Content Highlights */
.highlight {
    display: inline-block;
    background: linear-gradient(120deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    margin: 0 -0.2rem;
    transition: background 0.3s ease;
}

.dark .highlight {
    background: linear-gradient(120deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
}

.key-skill {
    color: #3b82f6;
    font-weight: 500;
}

.dark .key-skill {
    color: #60a5fa;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline-content ul li {
    position: relative;
    padding-left: 1.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.timeline-content ul li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #3b82f6;
}

.dark .timeline-content ul li::before {
    color: #60a5fa;
}

.dark .timeline-content ul li {
    color: #e5e7eb;
}

/* Achievement styles */
.achievement {
    position: relative;
    padding-left: 1rem;
    margin: 0.8rem 0;
    border-left: 2px solid;
    border-image: linear-gradient(to bottom, #3b82f6, #8b5cf6) 1;
}

.dark .achievement {
    border-image: linear-gradient(to bottom, #60a5fa, #a78bfa) 1;
    color: #e5e7eb;
}

/* Remove any existing list styles from achievements */
.achievement ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.achievement ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.achievement ul li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #3b82f6;
}

.dark .achievement ul li::before {
    color: #60a5fa;
}

.timeline-content p {
    color: #4a5568;
}

.dark .timeline-content p {
    color: #e5e7eb;
}

/* Mobile Header Menu */
@media screen and (max-width: 768px) {
    header nav {
        position: relative;
        z-index: 1000;
    }

    #menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        border: 1px solid rgba(209, 213, 219, 0.3);
        transform-origin: top;
        transition: all 0.3s ease;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    #menu.hidden {
        opacity: 0;
        transform: scaleY(0);
        pointer-events: none;
    }

    #menu li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #menu li a,
    #menu li button {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(0.5rem);
    }

    #menu li:first-child a {
        transform: translateX(0.5rem);
    }

    #menu li button#theme-toggle {
        width: 100%;
        justify-content: center;
        transform: translateX(0.5rem);
    }

    .dark #menu {
        background: rgba(31, 41, 55, 0.98);
        border-color: rgba(75, 85, 99, 0.3);
    }

    #menu-toggle {
        display: block;
        padding: 0.5rem;
        font-size: 1.5rem;
        border: none;
        background: none;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    #menu-toggle:hover {
        transform: scale(1.1);
    }

    .project-card {
        background: rgba(255, 255, 255, 1);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .dark .project-card {
        background: rgba(31, 41, 55, 1);
    }

    .project-card::before {
        opacity: 0.3;
        filter: blur(12px);
    }

    .dark .project-card::before {
        opacity: 0.4;
    }

    .project-card:hover::before {
        opacity: 0.6;
        filter: blur(15px);
    }

    .dark .project-card:hover::before {
        opacity: 0.7;
    }

    #menu li a[href="#about"] {
        transform: translateX(1.5rem); /* Increased from 1rem to move About link further right */
    }
}