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

html {
    scroll-behavior: smooth;
}

:root {
    /* Light Mode Colors */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(0, 0, 0, 0.95);
    --card-bg: #1a1a2e;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: var(--nav-bg) !important;
    box-shadow: 0 2px 20px var(--shadow-color);
}

/* Ensure navbar background is always correct for both themes */
[data-theme="dark"] .navbar {
    background: var(--nav-bg) !important;
}

[data-theme="dark"] .navbar.scrolled {
    background: var(--nav-bg) !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo a {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

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

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

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

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

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

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



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

.profile-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 3/4;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-primary);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

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

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.skills h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.image-container {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow-color);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background: var(--bg-tertiary);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 0;     /* Remove bottom margin */
    padding-top: 60px;    /* Add top padding to create overlap */
}

.timeline-item:first-child {
    padding-top: 0;       /* First item starts at the top */
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--card-bg);
    border: 4px solid var(--accent-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
    width: 47%;
    margin-left: 53%;
    margin-top: -30px;
    border: 1px solid var(--border-color);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0%;
    margin-top: -30px;
}

.timeline-header h3 {
    font-size: 1.3rem;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.company {
    color: var(--accent-primary);
    font-weight: 600;
    margin-right: 10px;
}

.duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timeline-content p {
    margin: 12px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.achievements {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.achievement {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow-color);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-links {
    display: flex;
    gap: 20px;
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.1);
    background: var(--accent-primary);
    color: white;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Achievements Section */
.achievements {
    padding: 60px 0;
    background: var(--bg-tertiary);
}

.achievements-banner {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    height: 60px;
    display: flex;
    align-items: center;
    position: relative;
}

.achievements-banner::before,
.achievements-banner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.achievements-banner::before {
    left: 0;
    background: linear-gradient(to right, var(--card-bg), transparent);
}

.achievements-banner::after {
    right: 0;
}

.achievements-ticker {
    display: flex;
    align-items: center;
    animation: scrollTicker 40s linear infinite;
    white-space: nowrap;
    padding: 0 20px;
}

.achievements-ticker:hover {
    animation-play-state: paused;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.achievement-item {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    margin-right: 60px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.achievement-item::after {
    content: '•';
    position: absolute;
    right: -35px;
    color: var(--accent-primary);
    font-weight: bold;
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--bg-tertiary);
}

.contact-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 100px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 0;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
}

.contact-details a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    word-break: break-all;
}

.contact-details a:hover {
    color: #111;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}



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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-color);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
    }

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

    .achievements-banner {
        height: 50px;
    }
    
    .achievement-item {
        font-size: 0.9rem;
        margin-right: 40px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .profile-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }
} 

.hero-image-left {
    margin-left: -40px;
}

@media (max-width: 900px) {
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    .contact-image {
        margin-right: 0;
        margin-top: 20px;
    }
} 

/* --- Responsive improvements for all sections and achievements --- */

/* 1. Make images and containers fluid */
.profile-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 3/4;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.image-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 2. Reduce section paddings on small screens */
@media (max-width: 600px) {
    .about, .experience, .projects, .achievements, .gallery, .contact {
        padding: 40px 0;
    }
    .section-header {
        margin-bottom: 30px;
    }
}

/* 3. Make .profile-image and other fixed-size elements responsive */
@media (max-width: 480px) {
    .profile-image {
        max-width: 180px;
        aspect-ratio: 3/4;
    }
    .image-container {
        max-width: 200px;
    }
}

/* 4. Improve .achievement-card and .achievements-scroll for mobile */
@media (max-width: 768px) {
    .achievements-banner {
        height: 45px;
    }
    .achievement-item {
        font-size: 0.85rem;
        margin-right: 30px;
    }
}
@media (max-width: 480px) {
    .achievements-scroll {
        gap: 8px;
    }
    .achievement-card {
        width: 120px;
        min-height: 50px;
        padding: 6px 2px;
    }
    .achievement-card h3 {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
}

/* 5. Add a breakpoint for ultra-small screens */
@media (max-width: 350px) {
    .hero-title, .section-title {
        font-size: 1.2rem;
    }
    .achievements-banner {
        height: 40px;
    }
    .achievement-item {
        font-size: 0.75rem;
        margin-right: 25px;
    }
}

/* 6. Prevent horizontal scroll/overflow */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* 7. Ensure .achievements-scroll is always scrollable on mobile */
.achievements-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE and Edge */
}
.achievements-scroll-container::-webkit-scrollbar {
    display: none;                 /* Chrome, Safari, Opera */
}
.achievements-scroll {
    display: flex;
    flex-wrap: nowrap;
    min-width: 100vw;
    width: max-content;
    gap: 30px;
    animation: scrollAchievements 60s linear infinite;
}

/* 8. Fix for .footer-content on small screens */
@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
} 
