/* Variables */
:root {
    --primary-color: #02569B;
    --text-color: #333;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Dark mode colors */
    --dark-bg: #121212;
    --dark-surface: #1e1e1e;
    --dark-text: #ffffff;
    --dark-text-secondary: rgba(255, 255, 255, 0.7);
    --dark-border: rgba(255, 255, 255, 0.1);
    --dark-card-bg: #2d2d2d;
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav__logo {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav__logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(2, 86, 155, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav__logo:hover::before {
    opacity: 1;
}

.nav__links {
    display: flex;
    gap: 32px;
}

.nav__links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav__links a:hover {
    color: var(--primary-color);
}

.nav__links a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

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

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

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

.btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(2, 86, 155, 0.1) 0%, rgba(2, 86, 155, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(2, 86, 155, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

.hero__loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.5s ease;
}

.hero__loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(2, 86, 155, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.hero__content {
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    position: relative;
}

.hero__greeting {
    font-size: 24px;
    margin-bottom: 20px;
    display: block;
}

.hero__name {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), #0288d1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient 8s ease infinite;
}

.hero__title {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.hero__tagline {
    font-size: 18px;
    margin-bottom: 32px;
    color: #666;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero__shape {
    position: absolute;
    background: rgba(2, 86, 155, 0.05);
    border-radius: 50%;
}

.hero__shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
}

.hero__shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
}

.hero__shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Section Styles */
.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), #0288d1);
    border-radius: 3px;
}

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

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

.about__text {
    font-size: 18px;
    margin-bottom: 40px;
    text-align: center;
}

.about__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.info-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-item i {
    font-size: 24px;
    color: var(--primary-color);
}

.about__social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Skills Section */
.skills {
    padding: 50px 0;
    background-color: var(--light-gray);
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skills__category {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 24px;
    border-radius: 12px;
}

.skills__category h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skills__items {
    display: grid;
    gap: 16px;
}

.skill-item {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all 0.3s ease;
}

.skill-item h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.skill-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dark mode styles for skill cards */
[data-theme="dark"] .skills__grid {
    background-color: var(--dark-bg);
}

[data-theme="dark"] .skills__category {
    background-color: var(--dark-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 24px;
    border-radius: 12px;
}


[data-theme="dark"] .skill-item {
    background-color: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .skill-item h3 {
    color: var(--dark-text);
}

[data-theme="dark"] .skill-item p {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .skill-item:hover {
    background-color: var(--dark-surface);
    transform: translateX(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Ensure skills section background */
[data-theme="dark"] #skills {
    background-color: var(--dark-bg);
}

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

/* Add hover effect for skill items */
.skill-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Ensure smooth transitions */
.skill-item,
.skill-item h3,
.skill-item p {
    transition: all 0.3s ease;
}

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

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

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

.timeline__item {
    margin-bottom: 40px;
    position: relative;
    width: 50%;
    padding-right: 40px;
    transition: all 0.4s ease;
}

.timeline__item:nth-child(even) {
    margin-left: auto;
    padding-right: 0;
    padding-left: 40px;
}

.timeline__item::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--white);
}

.timeline__item:nth-child(even)::before {
    right: auto;
    left: -8px;
}

.timeline__content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 24px;
    border-radius: 12px;
    position: relative;
    transition: all 0.4s ease;
}

.timeline__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(2, 86, 155, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline__item:hover .timeline__content {
    transform: translateX(10px);
}

.timeline__item:hover .timeline__content::before {
    opacity: 1;
}

.timeline__content h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline__content h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.timeline__period {
    color: #666;
    margin-bottom: 12px;
}

/* Projects Section */
.projects {
    padding: 50px 0;
    background-color: var(--light-gray);
}

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

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(2, 86, 155, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.project-card__image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-card__content {
    padding: 24px;
}

.project-card__content h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.project-card__content p {
    margin-bottom: 16px;
}

.project-card__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-card__stack span {
    background: rgba(2, 86, 155, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card__stack span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(2, 86, 155, 0.2);
}

.project-card__links {
    display: flex;
    gap: 12px;
}

/* Project card link styles */
.project-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

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

.project-card__link:hover .project-card__image img {
    transform: scale(1.05);
}

.project-card__image img {
    transition: transform 0.3s ease;
}

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

.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact__form .form-group {
    margin-bottom: 20px;
}

.contact__form input,
.contact__form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.contact__form input:focus,
.contact__form textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(2, 86, 155, 0.1);
    border-color: var(--primary-color);
}

.contact__form textarea {
    height: 150px;
    resize: vertical;
}

.contact__info {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 32px;
    border-radius: 12px;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.contact__item i {
    font-size: 24px;
    color: var(--primary-color);
}

.contact__social {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

/* Social Links */
.social-link {
    color: var(--primary-color);
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(2, 86, 155, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-link:hover::before {
    width: 40px;
    height: 40px;
}

/* Footer Styles */
.footer {
    background: var(--card-bg);
    padding: 80px 0 20px;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

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

.footer__title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer__description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.footer__social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer__social .social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer__social .social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(2, 86, 155, 0.2);
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.footer__contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.footer__contact i {
    color: var(--primary-color);
    font-size: 18px;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer__copyright,
.footer__made-with {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer__made-with i {
    color: #e25555;
    margin: 0 5px;
}

/* Dark mode styles for footer */
[data-theme="dark"] .footer {
    background: var(--dark-bg);
    border-top-color: var(--dark-border);
}

[data-theme="dark"] .footer__title {
    color: var(--primary-color);
}

[data-theme="dark"] .footer__description,
[data-theme="dark"] .footer__links a,
[data-theme="dark"] .footer__contact li,
[data-theme="dark"] .footer__copyright,
[data-theme="dark"] .footer__made-with {
    color: var(--dark-text-secondary);
}

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

/* Responsive styles for footer */
@media (max-width: 768px) {
    .footer {
        padding: 60px 0 20px;
    }

    .footer__content {
        gap: 30px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Fade Animations */
.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

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

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero__name {
        font-size: 48px;
    }

    .hero__title {
        font-size: 20px;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline__item {
        width: 100%;
        padding-left: 40px;
        padding-right: 0;
    }

    .timeline__item:nth-child(even) {
        padding-left: 40px;
    }

    .timeline__item::before {
        left: -8px;
        right: auto;
    }

    .nav__links {
        display: none;
    }

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

    .timeline__item:hover .timeline__content {
        transform: translateX(5px);
    }

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

@media (max-width: 480px) {
    .hero__name {
        font-size: 36px;
    }

    .hero__cta {
        flex-direction: column;
    }

    .section-title {
        font-size: 28px;
    }
}

/* Dark mode styles */
[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --text-color: var(--dark-text);
    --text-secondary: var(--dark-text-secondary);
    --card-bg: var(--dark-surface);
    --border-color: var(--dark-border);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

[data-theme="dark"] .nav {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid var(--dark-border);
}

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

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

[data-theme="dark"] .project-card,
[data-theme="dark"] .timeline__content,
[data-theme="dark"] .skill-item,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .blog-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
}

[data-theme="dark"] .contact__form input,
[data-theme="dark"] .contact__form textarea {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

[data-theme="dark"] .contact__form input:focus,
[data-theme="dark"] .contact__form textarea:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer {
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
}

[data-theme="dark"] .footer__links a {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .footer__links a:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .theme-toggle {
    background: var(--primary-color);
    color: var(--white);
}

[data-theme="dark"] .theme-toggle:hover {
    background: #014a7d;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #014a7d;
}

/* Loading animation for images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Enhanced focus styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {

    .nav,
    .theme-toggle,
    .contact__form {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        break-inside: avoid;
    }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Enhanced mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-color);
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

/* Enhanced project filters */
.project-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Enhanced testimonials */
.testimonial-card {
    position: relative;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    margin: 20px 0;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.2;
}

.testimonial-card__content {
    position: relative;
    z-index: 1;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.testimonial-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Enhanced blog cards */
.blog-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.blog-card__image {
    position: relative;
    padding-top: 60%;
}

.blog-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__content {
    padding: 20px;
}

.blog-card__date {
    color: var(--text-secondary);
    font-size: 14px;
}

.blog-card__title {
    margin: 10px 0;
    font-size: 20px;
}

.blog-card__excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Enhanced contact form */
.contact__form-group {
    position: relative;
    margin-bottom: 20px;
}

.contact__form-label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
}

.contact__form input:focus+.contact__form-label,
.contact__form input:not(:placeholder-shown)+.contact__form-label,
.contact__form textarea:focus+.contact__form-label,
.contact__form textarea:not(:placeholder-shown)+.contact__form-label {
    top: -10px;
    left: 0;
    font-size: 12px;
    color: var(--primary-color);
}

/* Enhanced footer */
.footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer__links {
    list-style: none;
    padding: 0;
}

.footer__links li {
    margin-bottom: 10px;
}

.footer__links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer__links a:hover {
    color: var(--primary-color);
}

.footer__social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Add smooth transition for theme changes */
.project-card,
.timeline__content,
.skill-item,
.testimonial-card,
.blog-card,
.nav,
.footer {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__form input,
.contact__form textarea {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Add this block to ensure sections adapt to dark mode background */
[data-theme="dark"] .section {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Ensure headers and paragraphs within sections also follow dark mode text color */
[data-theme="dark"] .section h1,
[data-theme="dark"] .section h2,
[data-theme="dark"] .section h3,
[data-theme="dark"] .section h4,
[data-theme="dark"] .section p,
[data-theme="dark"] .section span {
    color: var(--dark-text);
}

/* Override specific elements that might have their own background */
[data-theme="dark"] .project-card,
[data-theme="dark"] .timeline__content,
[data-theme="dark"] .skill-item,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .blog-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
    /* Ensure text inside cards is also dark mode */
}

[data-theme="dark"] .contact__form {
    background-color: var(--dark-bg);
    /* Ensure contact form background adapts */
}

/* Update dark mode styles */
[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --text-color: var(--dark-text);
    --text-secondary: var(--dark-text-secondary);
    --card-bg: var(--dark-surface);
    --border-color: var(--dark-border);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Ensure all sections adapt to dark mode */
[data-theme="dark"] .section {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Update specific section styles for dark mode */
[data-theme="dark"] #about,
[data-theme="dark"] #skills,
[data-theme="dark"] #experience,
[data-theme="dark"] #projects,
[data-theme="dark"] #contact {
    background-color: var(--dark-bg);
}

/* Update text colors for all sections */
[data-theme="dark"] .section-title,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .section-description {
    color: var(--dark-text);
}

/* Update card styles for dark mode */
[data-theme="dark"] .project-card,
[data-theme="dark"] .timeline__content,
[data-theme="dark"] .skill-item,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .blog-card {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
}

/* Update form elements for dark mode */
[data-theme="dark"] .contact__form input,
[data-theme="dark"] .contact__form textarea {
    background: var(--dark-card-bg);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

[data-theme="dark"] .contact__form input:focus,
[data-theme="dark"] .contact__form textarea:focus {
    border-color: var(--primary-color);
    background: var(--dark-surface);
}

/* Update timeline for dark mode */
[data-theme="dark"] .timeline__item::before {
    background: var(--dark-border);
}

[data-theme="dark"] .timeline__content {
    background: var(--dark-card-bg);
}

/* Update skills section for dark mode */
[data-theme="dark"] .skill-item {
    background: var(--dark-card-bg);
}

[data-theme="dark"] .skill-item:hover {
    background: var(--dark-surface);
}

/* Update project cards for dark mode */
[data-theme="dark"] .project-card__title,
[data-theme="dark"] .project-card__description {
    color: var(--dark-text);
}

[data-theme="dark"] .project-card__stack span {
    background: var(--dark-surface);
    color: var(--dark-text);
}

/* Update contact section for dark mode */
[data-theme="dark"] .contact__info {
    background: var(--dark-card-bg);
}

[data-theme="dark"] .contact__info-item {
    color: var(--dark-text);
}

/* Update buttons for dark mode */
[data-theme="dark"] .btn--primary {
    background: var(--primary-color);
    color: var(--white);
}

[data-theme="dark"] .btn--secondary {
    background: var(--dark-surface);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

/* Add smooth transitions */
.section,
.project-card,
.timeline__content,
.skill-item,
.testimonial-card,
.blog-card,
.contact__form input,
.contact__form textarea,
.btn {
    transition: all 0.3s ease;
}

/* Testimonials Section Styles */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-color);
}

.testimonial-card__content {
    position: relative;
    z-index: 1;
}

.testimonial-card__quote {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 15px;
    opacity: 0.2;
}

.testimonial-card__quote i {
    font-size: 32px;
}

.testimonial-card p {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.testimonial-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.testimonial-card__info h4 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 5px;
}

.testimonial-card__info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Dark mode styles for testimonials */
[data-theme="dark"] .testimonial-card {
    background: var(--dark-card-bg);
    border-color: var(--dark-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .testimonial-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .testimonial-card p {
    color: var(--dark-text);
}

[data-theme="dark"] .testimonial-card__info h4 {
    color: var(--dark-text);
}

[data-theme="dark"] .testimonial-card__info p {
    color: var(--dark-text-secondary);
}

/* Responsive styles for testimonials */
@media (max-width: 768px) {
    .testimonials__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .testimonial-card__avatar {
        width: 50px;
        height: 50px;
    }
}

/* Project Details Page */
.project-details {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.project-details__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-details__image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.project-details__info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-details__info h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.project-details__subtitle {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.6;
}

.project-details__links {
    display: flex;
    gap: 16px;
}

.project-details__content {
    margin: 0 auto;
}

.project-details__section {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-details__section h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.project-details__section p {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 16px;
}

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

.project-details__section ul li {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.project-details__section ul li:before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.project-details__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.project-details__gallery img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

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

/* Dark mode styles for project details */
@media (prefers-color-scheme: dark) {
    .project-details {
        background-color: var(--dark-bg);
    }

    .project-details__header,
    .project-details__section {
        background: var(--dark-card);
    }

    .project-details__info h1 {
        color: var(--primary);
    }

    .project-details__subtitle,
    .project-details__section p,
    .project-details__section ul li {
        color: var(--light-text);
    }
}

/* Responsive styles for project details */
@media (max-width: 768px) {
    .project-details__header {
        grid-template-columns: 1fr;
    }

    .project-details__image {
        height: 300px;
    }

    .project-details__info {
        padding: 24px;
    }

    .project-details__info h1 {
        font-size: 2rem;
    }

    .project-details__section {
        padding: 24px;
    }

    .project-details__gallery {
        grid-template-columns: 1fr;
    }

    .project-details__gallery img {
        height: 400px;
    }
}