* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    outline: none;
}

.nav-logo a:focus,
.nav-logo a:active {
    outline: none;
}

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

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

.nav-link:focus,
.nav-link:active {
    outline: none;
}

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

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

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

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

.hamburger:focus,
.hamburger:active {
    outline: none;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 80px 20px 40px 20px;
    position: relative;
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

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

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    outline: none;
}

.btn:focus,
.btn:active {
    outline: none;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Language Toggle Styles */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-label {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.profile-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
    background: var(--bg-color);
}

section.about,
section.experience,
section.languages {
    background: var(--bg-light);
}

/* Education Section with Campus Background */
section.education {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('university_campus.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    position: relative;
}

section.education .section-title {
    color: white;
}

section.education .timeline-content {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Code background for section titles using codebackground.png */
.code-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 70px;
    background: url('codebackground.png') center center/cover no-repeat;
    opacity: 0.18;
    border-radius: 18px;
    z-index: 0;
    pointer-events: none;
}

/* About Section */
.about {
    background: var(--bg-light);
    position: relative;
    z-index: 2;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -11px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -11px;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-info {
    flex: 1;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* School Logo Styles */
.school-logo {
    flex-shrink: 0;
    margin-left: 1rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.school-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.school-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.school-logo a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.school-logo a:hover {
    opacity: 0.8;
}

.school-logo a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Experience Section */
.experience {
    background: var(--bg-light);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.experience-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.experience-info {
    flex: 1;
}

.experience-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.experience-company {
    color: var(--text-light);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.experience-date {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.experience-content ul {
    margin-top: 1rem;
    padding-left: 1rem;
}

.experience-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Company Logo Styles */
.company-logo {
    flex-shrink: 0;
    margin-left: 1rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.company-logo a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.company-logo a:hover {
    opacity: 0.8;
}

.company-logo a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Languages Section */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.language-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.language-flag {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.language-flag img {
    width: 40px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.proficiency-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.proficiency-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 2s ease;
    width: 0;
}

.proficiency-level {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Projects Page Styles */
.projects-header {
    position: relative;
    background: var(--gradient);
    color: white;
    padding: 120px 0 80px;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.projects-filter {
    padding: 40px 0;
    background: var(--bg-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:focus,
.filter-btn:active {
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    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: 1rem;
}

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

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

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

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Project Stats */
.project-stats {
    background: var(--gradient);
    color: white;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3,
.footer-social h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.contact-info p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.contact-info i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

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

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

.social-link:hover {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    opacity: 0.8;
}

/* Organization Involvement Section */
.organizations {
    background: var(--bg-light);
    padding: 60px 0;
}

.orgs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.org-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem 2.5rem;
    max-width: 350px;
    min-width: 260px;
    text-align: left;
    transition: transform 0.3s;
    position: relative;
}

.org-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lg);
}

.org-logo {
    position: absolute;
    top: 18px;
    left: 18px;
    right: auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.org-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    background: #fff;
}

.org-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-left: 56px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.org-card p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

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

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 15px;
        gap: 2rem;
    }

    .hero {
        padding: 100px 15px 40px 15px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .language-toggle {
        padding: 0.4rem 0.8rem;
        gap: 0.4rem;
    }

    .toggle-switch {
        width: 40px;
        height: 20px;
    }

    .slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(20px);
    }

    .profile-image {
        width: 300px;
        height: 300px;
    }

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

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 10px !important;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .school-logo {
        margin-left: 0;
        margin-top: 1rem;
        align-self: flex-end;
        width: 40px;
        height: 40px;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-logo {
        margin-left: 0;
        margin-top: 1rem;
        align-self: flex-end;
        width: 50px;
        height: 50px;
    }

    .org-logo {
        width: 36px;
        height: 36px;
        top: 15px;
        left: 15px;
    }
}

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

    .hero {
        padding: 100px 10px 30px 10px;
    }

    .hero-container {
        padding: 0 10px;
        gap: 1.5rem;
    }

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

    .profile-image {
        width: 250px;
        height: 250px;
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
