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

:root {
    /* Light mode (default fallback) */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #1f2937;
    --light-text-color: #6b7280;
    --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);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

/* Dark mode */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #fbbf24;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --light-text-color: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Light mode explicit */
[data-theme="light"] {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #1f2937;
    --light-text-color: #6b7280;
    --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);
}

html {
    scroll-behavior: smooth;
}

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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes particle-float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.3;
    }
}

@keyframes particle-drift {
    0% {
        transform: translateX(0px);
    }

    100% {
        transform: translateX(100px);
    }
}

/* Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    line-height: 1.5;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-full {
    width: 100%;
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--light-text-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.95);
}

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

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

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

.nav-menu {
    display: flex;
    gap: 32px;
}

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

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
    position: relative;
    overflow: hidden;
}

/* Constellation background */
.constellation-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.constellation-bg .star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 1;
    animation: star-float 4s ease-in-out infinite, star-twinkle 2s ease-in-out infinite;
    will-change: opacity, transform;
    transition: transform 0.3s ease;
    box-shadow: 0 0 12px var(--primary-color);
}

.constellation-bg .star:nth-child(odd) {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    animation: star-float 4s ease-in-out infinite, star-twinkle 2s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.2s), calc(var(--i, 0) * 0.1s);
}

.constellation-bg .star:nth-child(even) {
    background: var(--secondary-color);
    box-shadow: 0 0 8px var(--secondary-color);
    animation: star-float 5s ease-in-out infinite, star-pulse 3s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.3s), calc(var(--i, 0) * 0.15s);
}

/* Individual star positioning */
.star-1 {
    left: 15%;
    top: 20%;
}

.star-2 {
    left: 25%;
    top: 15%;
}

.star-3 {
    left: 35%;
    top: 25%;
}

.star-4 {
    left: 45%;
    top: 10%;
}

.star-5 {
    left: 55%;
    top: 30%;
}

.star-6 {
    left: 65%;
    top: 20%;
}

.star-7 {
    left: 75%;
    top: 35%;
}

.star-8 {
    left: 85%;
    top: 25%;
}

.star-9 {
    left: 20%;
    top: 50%;
}

.star-10 {
    left: 30%;
    top: 45%;
}

.star-11 {
    left: 40%;
    top: 60%;
}

.star-12 {
    left: 50%;
    top: 55%;
}

.star-13 {
    left: 60%;
    top: 45%;
}

.star-14 {
    left: 70%;
    top: 60%;
}

.star-15 {
    left: 80%;
    top: 50%;
}

.star-16 {
    left: 10%;
    top: 70%;
}

.star-17 {
    left: 25%;
    top: 75%;
}

.star-18 {
    left: 40%;
    top: 80%;
}

.star-19 {
    left: 60%;
    top: 75%;
}

.star-20 {
    left: 75%;
    top: 80%;
}

.star-21 {
    left: 90%;
    top: 70%;
}

.connections-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .constellation-bg .star:nth-child(odd) {
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

[data-theme="dark"] .constellation-bg .star:nth-child(even) {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

[data-theme="light"] .constellation-bg .star:nth-child(odd) {
    background: var(--secondary-color);
    box-shadow: 0 0 8px var(--secondary-color);
}

[data-theme="light"] .constellation-bg .star:nth-child(even) {
    background: var(--primary-color);
    box-shadow: 0 0 6px var(--primary-color);
}

@keyframes star-float {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    25% {
        transform: translate3d(15px, -10px, 0);
    }

    50% {
        transform: translate3d(0, -20px, 0);
    }

    75% {
        transform: translate3d(-12px, 8px, 0);
    }
}

@keyframes star-twinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.2;
        transform: scale(1.6);
    }
}

@keyframes star-pulse {

    0%,
    100% {
        opacity: 0.9;
        transform: scale(1) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: scale(1.5) rotate(90deg);
    }

    75% {
        opacity: 0.3;
        transform: scale(0.6) rotate(270deg);
    }
}

.hero-container {
    position: relative;
    z-index: 2;
}



.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-text-color);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--light-text-color);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--surface-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-scroll {
    margin-top: 60px;
}

.scroll-down {
    color: var(--light-text-color);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

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

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

.about-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--light-text-color);
}

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

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--light-text-color);
    font-weight: 500;
}

.skills-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    gap: 30px;
}

.skill-category {
    background: var(--background-color);
    padding: 24px;
    border-radius: var(--border-radius);
}

.skill-category h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

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

.skill-tag {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

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

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-content {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: calc(50% - 30px);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--surface-color);
    box-shadow: var(--shadow);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 8px;
}

.timeline-period {
    color: var(--light-text-color);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.timeline-description {
    color: var(--light-text-color);
    line-height: 1.6;
}

.timeline-description ul {
    margin-left: 20px;
}

.timeline-description li {
    margin-bottom: 8px;
}

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

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

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

.project-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

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

.project-image {
    height: 200px;
    background: var(--background-color);
    position: relative;
    overflow: hidden;
}

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

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

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

.project-link:hover {
    background: var(--accent-color);
    color: var(--surface-color);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

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

.tech-tag {
    background: var(--background-color);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--background-color);
}

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

.service-card {
    background: var(--surface-color);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.service-description {
    color: var(--light-text-color);
    line-height: 1.6;
}

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

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

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--light-text-color);
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.contact-method:hover {
    background: var(--primary-color);
    color: var(--surface-color);
}

.contact-method-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.contact-method-info h4 {
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-method-info p {
    color: inherit;
    margin: 0;
    font-size: 0.875rem;
}

.contact-form {
    background: var(--background-color);
    padding: 40px;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--surface-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--surface-color);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .footer {
    background: #0a0f1c;
    color: var(--surface-color);
}

[data-theme="dark"] .footer-social .social-link {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .footer {
    background: #1f2937;
    color: var(--surface-color);
}

[data-theme="light"] .footer-social .social-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

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

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social .social-link:hover {
    background: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--surface-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    color: var(--text-color);
}

.modal-close:hover {
    color: var(--primary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .hero-subtitle {
        font-size: 1.25rem;
    }

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

    .hero-buttons .btn {
        width: 200px;
    }

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

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }

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

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

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

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero-social,
    .footer-social {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-image {
        width: 150px;
        height: 150px;
    }

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

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

    .contact-form {
        padding: 30px 20px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .hero-scroll,
    .back-to-top,
    .modal {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    [data-theme="dark"] body {
        background: white !important;
        color: black !important;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
    }

    section {
        padding: 40px 0 !important;
        break-inside: avoid;
    }
}