:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --accent-purple: #7c3aed;
    --accent-teal: #14b8a6;
    --accent-orange: #f59e0b;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f2ebe2;
    --bg-white: #f7f4ef;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
    z-index: 1001;
    transition: width 0.1s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-purple));
}

.back-to-top:active {
    transform: translateY(-3px) scale(1.05);
}

.back-to-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(247, 244, 239, 1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

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

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

.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 {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
    border-radius: 2px;
}

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

.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    outline: none;
}

.hamburger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    background: #f7f4ef;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.hero-content-new {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-main {
    animation: fadeInUp 0.8s ease;
}

.hero-header {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-title-new {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: #6366f1;
    letter-spacing: -0.02em;
}

.hero-description-new {
    font-size: 1.15rem;
    margin-bottom: 3rem;
    color: #4b5563;
    line-height: 1.8;
    max-width: 600px;
    letter-spacing: 0.01em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-cv-new {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
    outline: none;
}

.btn-cv-new::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-cv-new:active::before {
    width: 300px;
    height: 300px;
}

.btn-cv-new:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.btn-cv-new:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 8px;
}

.btn-cv-new:active {
    transform: translateY(0) scale(0.98);
}

.btn-contact-new {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    outline: none;
}

.btn-contact-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-contact-new:hover {
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-contact-new:hover::before {
    left: 0;
}

.btn-contact-new:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 8px;
}

.btn-contact-new:active {
    transform: translateY(0) scale(0.98);
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeInRight 0.8s ease;
    position: sticky;
    top: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.profile-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.profile-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.profile-item svg {
    flex-shrink: 0;
    color: #6b7280;
    margin-top: 0.125rem;
}

.profile-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.profile-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.profile-link:hover {
    color: var(--accent-teal);
}

.profile-link svg {
    width: 14px;
    height: 14px;
    color: currentColor;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
}

/* Sections */
.section {
    padding: 7rem 0;
    position: relative;
    scroll-margin-top: 80px;
}

.section-alt {
    background-color: var(--bg-light);
}

/* Smooth section transitions */
@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Experience Section */
.experience-item {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-teal);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    margin-bottom: 2rem;
}

.experience-item:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.experience-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-left-color: var(--primary-color);
    border-left-width: 6px;
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.experience-company {
    color: var(--accent-teal);
    font-weight: 600;
}

.experience-date {
    margin-left: auto;
    color: var(--accent-orange);
    font-size: 0.95rem;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.experience-location {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.experience-list {
    list-style: none;
    padding-left: 0;
}

.experience-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.experience-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
}

/* Experience Overview */
.experience-overview {
    margin: 1.5rem 0 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), rgba(20, 184, 166, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--accent-teal);
}

.overview-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.overview-text:last-child {
    margin-bottom: 0;
}

/* Mission Cards */
.mission-card {
    margin: 2rem 0;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mission-card:hover {
    box-shadow: var(--shadow);
}

.mission-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--border-color);
}

.mission-toggle:hover {
    background: var(--bg-light);
}

.mission-toggle.active {
    border-bottom-color: var(--accent-teal);
}

.mission-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.toggle-icon {
    font-size: 0.9rem;
    color: var(--accent-teal);
    transition: transform 0.3s ease;
}

.mission-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.mission-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.mission-toggle.active + .mission-content {
    max-height: 3000px;
    padding: 1.5rem;
}

.mission-section {
    margin-bottom: 1.5rem;
}

.mission-section:last-child {
    margin-bottom: 0;
}

.mission-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin-bottom: 0.75rem;
}

.mission-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.mission-list {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.mission-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.mission-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
    font-size: 1.2rem;
}

.mission-sublist {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.mission-sublist li {
    padding-left: 1.5rem;
}

.mission-sublist li::before {
    content: '◦';
    color: var(--accent-purple);
}

/* Tools Section */
.tools-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.tools-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tool-tag {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.tool-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Learnings Section */
.learnings-section {
    margin: 2rem 0 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--accent-green);
}

.learnings-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.learnings-section > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.learnings-list {
    list-style: none;
    padding-left: 0;
}

.learnings-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.learnings-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Projects Section */
.projects-intro {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
}

.projects-intro-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent-purple);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-green));
}

.project-card:nth-child(1) {
    border-top-color: var(--accent-teal);
}

.project-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
}

.project-card:nth-child(2) {
    border-top-color: var(--accent-purple);
}

.project-card:nth-child(3)::before {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-teal));
}

.project-card:nth-child(3) {
    border-top-color: var(--accent-orange);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.project-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-green));
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    width: fit-content;
    font-weight: 600;
}

.project-card:nth-child(2) .project-type {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.project-card:nth-child(3) .project-type {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-teal));
}

.project-company {
    color: var(--accent-teal);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-card:nth-child(2) .project-company {
    color: var(--accent-purple);
}

.project-card:nth-child(3) .project-company {
    color: var(--accent-orange);
}

.project-date {
    color: var(--accent-orange);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.project-list {
    list-style: none;
    padding-left: 0;
}

.project-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.project-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
}

.project-card:nth-child(2) .project-list li::before {
    color: var(--accent-purple);
}

.project-card:nth-child(3) .project-list li::before {
    color: var(--accent-orange);
}

/* Project Overview */
.project-overview {
    margin: 1.5rem 0 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), rgba(20, 184, 166, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--accent-teal);
}

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

.project-overview-text:last-child {
    margin-bottom: 0;
}

.project-overview-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.project-card:nth-child(2) .project-overview {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.02));
    border-left-color: var(--accent-purple);
}

.project-card:nth-child(3) .project-overview {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
    border-left-color: var(--accent-orange);
}

/* Project Detail Sections */
.project-detail-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent-teal);
}

.project-card:nth-child(2) .project-detail-section {
    border-left-color: var(--accent-purple);
}

.project-card:nth-child(3) .project-detail-section {
    border-left-color: var(--accent-orange);
}

.project-detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin-bottom: 0.75rem;
}

.project-card:nth-child(2) .project-detail-title {
    color: var(--accent-purple);
}

.project-card:nth-child(3) .project-detail-title {
    color: var(--accent-orange);
}

.project-detail-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.project-detail-list {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.project-detail-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.project-detail-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
    font-size: 1.2rem;
}

.project-card:nth-child(2) .project-detail-list li::before {
    color: var(--accent-purple);
}

.project-card:nth-child(3) .project-detail-list li::before {
    color: var(--accent-orange);
}

/* Project Learnings */
.project-learnings {
    margin: 2rem 0 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), rgba(20, 184, 166, 0.02));
    border-radius: 8px;
    border-left: 3px solid var(--accent-teal);
}

.project-card:nth-child(2) .project-learnings {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.02));
    border-left-color: var(--accent-purple);
}

.project-card:nth-child(3) .project-learnings {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
    border-left-color: var(--accent-orange);
}

.project-learnings-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.project-learnings > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.project-learnings-list {
    list-style: none;
    padding-left: 0;
}

.project-learnings-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.7;
}

.project-learnings-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
    font-size: 1.1rem;
}

.project-card:nth-child(2) .project-learnings-list li::before {
    color: var(--accent-purple);
}

.project-card:nth-child(3) .project-learnings-list li::before {
    color: var(--accent-orange);
}

/* Education Section */
.education-item {
    max-width: 900px;
    margin: 0 auto 3rem;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-green);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.education-item:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.education-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-left-width: 6px;
}

.education-item:last-child {
    margin-bottom: 0;
    border-left-color: var(--accent-pink);
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-item:first-child:hover {
    border-left-color: var(--primary-color);
}

.education-item:last-child:hover {
    border-left-color: var(--accent-purple);
}

.education-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.education-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.education-date {
    color: var(--accent-orange);
    font-size: 0.95rem;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.education-institution {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.education-item:last-child .education-institution {
    color: var(--accent-pink);
}

.education-location {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.education-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* Skills Section */
.skills-content {
    max-width: 1000px;
    margin: 0 auto;
}

.skills-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.skills-row .skills-section {
    margin-bottom: 0;
}

.skills-section,
.languages-section {
    margin-bottom: 3rem;
}

.skills-section:last-of-type,
.languages-section:last-child {
    margin-bottom: 0;
}

.skills-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
}

.skill-tag:nth-child(1) { border-color: var(--primary-color); }
.skill-tag:nth-child(2) { border-color: var(--accent-teal); }
.skill-tag:nth-child(3) { border-color: var(--accent-purple); }
.skill-tag:nth-child(4) { border-color: var(--accent-orange); }
.skill-tag:nth-child(5) { border-color: var(--accent-pink); }
.skill-tag:nth-child(6) { border-color: var(--accent-green); }
.skill-tag:nth-child(7) { border-color: var(--primary-color); }
.skill-tag:nth-child(8) { border-color: var(--accent-teal); }

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.skill-tag:nth-child(1):hover { 
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.skill-tag:nth-child(2):hover { 
    background: var(--accent-teal);
    border-color: var(--accent-teal);
}
.skill-tag:nth-child(3):hover { 
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}
.skill-tag:nth-child(4):hover { 
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}
.skill-tag:nth-child(5):hover { 
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}
.skill-tag:nth-child(6):hover { 
    background: var(--accent-green);
    border-color: var(--accent-green);
}
.skill-tag:nth-child(7):hover { 
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.skill-tag:nth-child(8):hover { 
    background: var(--accent-teal);
    border-color: var(--accent-teal);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.language-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.language-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.language-name {
    font-weight: 600;
    color: var(--text-dark);
}

.language-level {
    padding: 0.25rem 0.75rem;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Niveaux A (Débutant) - Jaune/Orange */
.language-level.level-a1,
.language-level.level-a2 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Niveaux B (Intermédiaire) - Orange/Amber */
.language-level.level-b1,
.language-level.level-b2 {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

/* Niveau C1 (Avancé) - Bleu */
.language-level.level-c1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* Niveau C2 (Maîtrise) - Vert/Violet */
.language-level.level-c2 {
    background: linear-gradient(135deg, var(--accent-green), #059669);
}

/* Contact Section */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 400px;
    justify-content: center;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.contact-item:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.contact-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.contact-item:hover::before {
    transform: scaleY(1);
}

.contact-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
    border-left-color: var(--primary-color);
    border-left-width: 6px;
}

.contact-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.contact-item:nth-child(1) {
    border-left-color: var(--accent-pink);
}

.contact-item:nth-child(2) {
    border-left-color: var(--accent-green);
}

.contact-item:nth-child(3) {
    border-left-color: var(--primary-color);
}

.contact-item:nth-child(4) {
    border-left-color: var(--accent-orange);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-item:nth-child(1):hover {
    color: var(--accent-pink);
    border-left-color: var(--accent-pink);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(236, 72, 153, 0.02));
}

.contact-item:nth-child(2):hover {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

.contact-item:nth-child(3):hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.02));
}

.contact-item:nth-child(4):hover {
    color: var(--accent-orange);
    border-left-color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
}

.contact-item svg {
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

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

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

    .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-lg);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media (max-width: 968px) {
    .hero-content-new {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .profile-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-title-new {
        font-size: 2.5rem;
    }

    .hero-description-new {
        font-size: 1rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

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

    .container {
        padding: 0 1rem;
    }

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

    .experience-date,
    .education-date {
        margin-left: 0;
    }

    .project-card,
    .experience-item,
    .education-item {
        padding: 1.5rem;
    }

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

    .skills-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
}

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

.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-icon {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

html[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

html[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dark Mode Variables - Applied to html element */
html[data-theme="dark"] {
    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Dark mode specific overrides */
html[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

html[data-theme="dark"] .navbar {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
}

html[data-theme="dark"] .nav-link {
    color: var(--text-dark);
}

html[data-theme="dark"] .nav-link:hover {
    color: var(--primary-color);
}

html[data-theme="dark"] .hamburger span {
    background: var(--text-dark);
}

html[data-theme="dark"] .hero {
    background: #0f172a;
}

html[data-theme="dark"] .section {
    background: var(--bg-light);
}

html[data-theme="dark"] .section-alt {
    background: #1e293b;
}

html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .experience-item,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .education-item,
html[data-theme="dark"] .contact-item {
    background: #1e293b;
    border-color: var(--border-color);
    color: var(--text-dark);
}

html[data-theme="dark"] .profile-card-title,
html[data-theme="dark"] .experience-title,
html[data-theme="dark"] .project-title,
html[data-theme="dark"] .education-title {
    color: var(--text-dark);
}

html[data-theme="dark"] .experience-company,
html[data-theme="dark"] .project-company,
html[data-theme="dark"] .education-institution {
    color: var(--text-light);
}

html[data-theme="dark"] .experience-summary,
html[data-theme="dark"] .project-summary,
html[data-theme="dark"] .education-description {
    color: var(--text-light);
}

html[data-theme="dark"] .skill-tag {
    background: #334155;
    color: var(--text-dark);
    border-color: var(--border-color);
}

html[data-theme="dark"] .language-item {
    background: #1e293b;
    color: var(--text-dark);
    border-color: var(--border-color);
}

html[data-theme="dark"] .language-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    background: #334155;
}

html[data-theme="dark"] .language-name {
    color: var(--text-dark);
}

html[data-theme="dark"] .section-title {
    color: var(--text-dark);
}

html[data-theme="dark"] .modal-content {
    background: #1e293b;
    color: var(--text-dark);
}

html[data-theme="dark"] .modal-title {
    color: var(--text-dark);
}

html[data-theme="dark"] .modal-company,
html[data-theme="dark"] .modal-date {
    color: var(--text-light);
}

html[data-theme="dark"] .footer {
    background: #1e293b;
    color: var(--text-light);
}

html[data-theme="dark"] .contact-description {
    color: var(--text-light);
}

html[data-theme="dark"] .hero-title-new {
    color: #818cf8;
}

html[data-theme="dark"] .hero-description-new {
    color: var(--text-light);
}

html[data-theme="dark"] .btn-contact-new {
    color: #818cf8;
    border-color: #818cf8;
}

html[data-theme="dark"] .btn-contact-new:hover {
    color: white;
    background: #818cf8;
    box-shadow: 0 8px 16px rgba(129, 140, 248, 0.4);
}

html[data-theme="dark"] .btn-contact-new::before {
    background: #818cf8;
}

html[data-theme="dark"] .profile-label {
    color: #94a3b8;
}

html[data-theme="dark"] .profile-value {
    color: var(--text-dark);
}

html[data-theme="dark"] .profile-item svg {
    color: var(--text-light);
}

html[data-theme="dark"] .scroll-indicator {
    color: var(--text-light);
}

html[data-theme="dark"] .projects-intro {
    background: rgba(124, 58, 237, 0.1);
    border-left-color: var(--accent-purple);
}

html[data-theme="dark"] .projects-intro-text {
    color: var(--text-light);
}

html[data-theme="dark"] .scroll-progress {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
    box-shadow: 0 2px 4px rgba(129, 140, 248, 0.3);
}

html[data-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

html[data-theme="dark"] .back-to-top:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
}

html[data-theme="dark"] .loading-spinner {
    border-color: #334155;
    border-top-color: #818cf8;
}

html[data-theme="dark"] .modal-loading p {
    color: var(--text-light);
}

html[data-theme="dark"] .section-title::after {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}

html[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0);
}

html[data-theme="dark"] .modal-overlay {
    animation: fadeInOverlayDark 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInOverlayDark {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        background: rgba(0, 0, 0, 0.8);
    }
}

html[data-theme="dark"] .theme-toggle {
    border-color: var(--border-color);
}

html[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* Dark mode hover effects for cards */
html[data-theme="dark"] .experience-item:hover,
html[data-theme="dark"] .project-card:hover,
html[data-theme="dark"] .education-item:hover {
    background: #334155;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .profile-card:hover {
    background: #334155;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Dark mode hover for skill tags */
html[data-theme="dark"] .skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .skill-tag:nth-child(1):hover {
    background: #1e40af;
    border-color: var(--primary-color);
}

html[data-theme="dark"] .skill-tag:nth-child(2):hover {
    background: #7c2d12;
    border-color: var(--accent-orange);
}

html[data-theme="dark"] .skill-tag:nth-child(3):hover {
    background: #065f46;
    border-color: var(--accent-green);
}

html[data-theme="dark"] .skill-tag:nth-child(4):hover {
    background: #6b21a8;
    border-color: var(--accent-purple);
}

html[data-theme="dark"] .skill-tag:nth-child(5):hover {
    background: #be185d;
    border-color: var(--accent-pink);
}

html[data-theme="dark"] .skill-tag:nth-child(6):hover {
    background: #0f766e;
    border-color: var(--accent-teal);
}

html[data-theme="dark"] .skill-tag:nth-child(7):hover {
    background: #1e40af;
    border-color: var(--primary-color);
}

html[data-theme="dark"] .skill-tag:nth-child(8):hover {
    background: #7c2d12;
    border-color: var(--accent-orange);
}

/* Dark mode hover for contact items */
html[data-theme="dark"] .contact-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
    border-left-color: var(--primary-color);
    border-left-width: 6px;
    background: #334155;
}

html[data-theme="dark"] .contact-item:nth-child(1):hover {
    color: var(--accent-pink);
    border-left-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.2);
}

html[data-theme="dark"] .contact-item:nth-child(2):hover {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.2);
}

html[data-theme="dark"] .contact-item:nth-child(3):hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.2);
}

html[data-theme="dark"] .contact-item:nth-child(4):hover {
    color: var(--accent-orange);
    border-left-color: var(--accent-orange);
    background: rgba(245, 158, 11, 0.2);
}

/* Custom scrollbar for modal in dark mode */
html[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .modal-content::-webkit-scrollbar {
    width: 12px;
}

html[data-theme="dark"] .modal-content::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 6px;
}

html[data-theme="dark"] .modal-content::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 6px;
    border: 2px solid #0f172a;
}

html[data-theme="dark"] .modal-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Firefox scrollbar for modal in dark mode */
html[data-theme="dark"] .modal-content {
    scrollbar-width: thin;
    scrollbar-color: #475569 #0f172a;
}

/* Custom scrollbar for body in dark mode */
html[data-theme="dark"] ::-webkit-scrollbar {
    width: 12px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0f172a;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 6px;
    border: 2px solid #0f172a;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Firefox scrollbar for body in dark mode */
html[data-theme="dark"] {
    scrollbar-width: thin;
    scrollbar-color: #475569 #0f172a;
}

/* Smooth scroll reveal with improved animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for cards */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }

/* Experience and Project Summaries */
.experience-summary,
.project-summary {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}

.experience-summary p,
.project-summary p {
    margin: 0;
}

/* View Details Button */
.btn-view-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    outline: none;
}

.btn-view-details::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-view-details:active::before {
    width: 300px;
    height: 300px;
}

.btn-view-details:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.btn-view-details:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 8px;
}

.btn-view-details:active {
    transform: translateY(0) scale(0.98);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.modal.closing .modal-overlay {
    animation: fadeOutOverlay 0.25s ease-in forwards;
}

.modal.closing .modal-content {
    animation: modalSlideOut 0.25s ease-in forwards;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    animation: fadeInOverlay 0.3s ease-out forwards;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--text-dark);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.modal-header {
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-company {
    font-size: 1.1rem;
    color: var(--accent-teal);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.modal-date {
    font-size: 0.95rem;
    color: var(--accent-orange);
    font-weight: 500;
}

.modal-body {
    padding: 2rem 2.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body .experience-overview,
.modal-body .project-overview {
    margin-bottom: 2rem;
}

.modal-body .mission-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.modal-body .mission-section:last-child {
    border-bottom: none;
}

.modal-body .mission-subsection {
    margin-top: 1.5rem;
}

.modal-body .mission-subsection:first-child {
    margin-top: 0;
}

.modal-body .project-detail-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.modal-body .project-detail-section:last-child {
    border-bottom: none;
}

.modal-body .tools-section,
.modal-body .learnings-section,
.modal-body .project-learnings {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

/* Modal Animations */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        background: rgba(0, 0, 0, 0.6);
    }
}

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

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

@keyframes fadeOutOverlay {
    from {
        opacity: 1;
        backdrop-filter: blur(8px);
        background: rgba(0, 0, 0, 0.6);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
        background: rgba(0, 0, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Modal */
@media (max-width: 768px) {
    .modal.active {
        padding: 1rem 0.5rem;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }

    .modal-header {
        padding: 2rem 1.5rem 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
    }
}
