/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --background-dark: #111827;
    --background-darker: #0f172a;
    --background-light: #1f2937;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-dark);
    scroll-behavior: smooth;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-darker) 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    text-align: center;
    opacity: 0;
    animation: fadeInLeft 1s ease forwards;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    margin-top: 18%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.hero-left h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInRight 1s ease 0.3s forwards;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.typewriter {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

/* Projects Section */
.projects {
    padding: 4rem 0;
    background-color: var(--background-light);
    position: relative;
    width: 100%;
    overflow: hidden;
}

.projects-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow: visible;
}

/* Remove edge gradients since we're not scrolling anymore */
.projects-container::before,
.projects-container::after {
    display: none;
}

.projects h2,
.experience h2,
.skills h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
    width: 100%;
    display: block;
    opacity: 0;
    animation: scaleIn 0.8s ease forwards;
}

.projects h2::after,
.experience h2::after,
.skills h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* Remove any individual overrides */
.experience h2,
.skills h2 {
    display: block;
    position: relative;
    left: auto;
    transform: none;
    margin-bottom: 4rem;
}

.experience h2::after,
.skills h2::after {
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
}

/* Ensure consistent spacing */
.skills h2 {
    margin-bottom: 4rem;
}

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

.project-card {
    background-color: var(--background-darker);
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: auto;
    justify-content: center;
    padding-bottom: 1.5rem;
}

.language-tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Custom scrollbar styling */
.skills-slider::-webkit-scrollbar {
    height: 8px;
}

.skills-slider::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 4px;
}

.skills-slider::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.skills-slider::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Clear float after the two sections */
main::after {
    content: '';
    display: table;
    clear: both;
}

/* Experience Section */
.experience {
    padding: 3rem 0;
    background-color: var(--background-dark);
    position: relative;
    clear: both;
}

.experience h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    transform: translateX(-50%);
    opacity: 0;
    animation: scaleIn 0.8s ease forwards;
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: calc(4rem + 1.5rem); /* Aligns with the center of the dots */
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    animation: growLine 1.5s ease forwards;
}

.timeline-item {
    position: relative;
    margin-bottom: 0;
    width: 25%;
    float: left;
    padding: 0 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.3s; }
.timeline-item:nth-child(2) { animation-delay: 0.6s; }
.timeline-item:nth-child(3) { animation-delay: 0.9s; }

.timeline-dot {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-dot:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3);
}

.timeline-content {
    background-color: var(--background-light);
    padding: 1.2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--background-light);
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.company {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.date {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Clear float */
.timeline::after {
    content: '';
    display: table;
    clear: both;
}

.resume-button {
    text-align: center;
    margin-top: 2rem;
}

/* Skills Section */
.skills {
    padding: 3rem 0;
    background-color: var(--background-light);
    position: relative;
    width: 100%;
}

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

.skills h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    transform: translateX(-50%);
    opacity: 0;
    animation: scaleIn 0.8s ease forwards;
}


.skills-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 3rem;
    padding: 2rem;
    justify-items: center;
    animation: fadeInSkills 1s ease forwards;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease forwards, floatSkill 3s ease-in-out infinite 1s;
    opacity: 0;
}

.skill-item:nth-child(1) { animation-delay: 0.1s, 1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s, 1.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s, 1.4s; }
.skill-item:nth-child(4) { animation-delay: 0.4s, 1.6s; }
.skill-item:nth-child(5) { animation-delay: 0.5s, 1.8s; }
.skill-item:nth-child(6) { animation-delay: 0.6s, 2s; }

.skill-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(0.8) drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
}

.skill-item:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
    filter: brightness(1) drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

@keyframes floatSkill {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Hide scrollbar but keep functionality */
.skills-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.skills-container::-webkit-scrollbar {
    display: none;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    padding: 1.5rem 0;
    background-color: var(--background-darker);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Animations */
@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 growLine {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        min-height: 50vh;
        padding: 1rem 0;
    }

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

    .profile-image {
        width: 180px;
        height: 180px;
        margin: 0 auto 1rem;
    }

    .hero-left h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .typewriter {
        font-size: 0.9rem;
    }

    .skills-track {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 2rem;
        padding: 1rem;
    }

    .skill-icon {
        width: 50px;
        height: 50px;
    }

    .skills {
        padding: 2rem 0;
    }

    .skills-track {
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        min-width: 200px;
        max-width: 200px;
    }
    
    .project-content {
        padding: 1rem;
    }

    .project-card h3 {
        font-size: 1.25rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .timeline::before {
        left: 1rem;
        width: 2px;
        height: 100%;
        top: 0;
        transform: none;
    }

    .timeline-dot {
        left: 1rem;
        transform: none;
        top: 0;
    }

    .timeline-content {
        margin-left: 3rem;
        margin-top: 0;
    }

    .experience {
        padding: 2rem 0;
    }

    .timeline-content {
        margin-top: 3rem;
        padding: 1rem;
    }

    .timeline-dot {
        width: 2rem;
        height: 2rem;
        font-size: 0.65rem;
    }
}

/* Add Intersection Observer for triggering animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.social-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 1000;
    background-color: var(--background-darker);
    padding: 1rem 0.5rem;
    border-radius: 1rem 0 0 1rem;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    animation: slideInRight 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--background-light);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: socialIconPop 0.5s ease forwards;
    opacity: 0;
    transform: scale(0);
}

.social-link:nth-child(1) {
    animation-delay: 1.2s;
}

.social-link:nth-child(2) {
    animation-delay: 1.4s;
}

.social-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0.8);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateX(-5px);
    background-color: var(--primary-color);
    box-shadow: -4px 4px 12px rgba(59, 130, 246, 0.3);
}

.social-link:hover .social-icon {
    filter: brightness(1);
    transform: rotate(360deg);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate(100%, -50%);
    }
    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

@keyframes socialIconPop {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* Add responsive styles for social sidebar */
@media (max-width: 768px) {
    .social-sidebar {
        padding: 0.8rem 0.4rem;
        gap: 1rem;
    }

    .social-link {
        width: 28px;
        height: 28px;
    }

    .social-icon {
        width: 16px;
        height: 16px;
    }
} 