/* Modern Portfolio Styles */
:root {
    --color-bg: #f8f9fa;
    --color-bg-section: #fff;
    --color-primary: #0d6efd;
    --color-secondary: #6610f2;
    --color-text: #222;
    --color-nav: #212529;
    --color-footer: #212529;
    --color-card-shadow: rgba(13,110,253,0.08);
    --color-card-shadow-hover: rgba(13,110,253,0.16);
    --color-border: #e9ecef;
    --color-progress-bg: #e9ecef;
    --color-progress-bar: linear-gradient(90deg, #0d6efd 60%, #6610f2 100%);
    --color-badge: linear-gradient(90deg, #0d6efd 60%, #6610f2 100%);
    --color-link: #0d6efd;
    --color-link-hover: #6610f2;
    --color-section-shadow: rgba(13,110,253,0.04);
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--color-bg) 0%, #e9ecef 100%);
    color: var(--color-text);
    transition: background 0.5s, color 0.5s;
}

.navbar {
    background: var(--color-nav) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    transition: background 0.5s, color 0.5s;
}

.navbar-brand, .navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.navbar-nav .nav-link.active {
    color: #0d6efd !important;
    border-bottom: 2px solid #0d6efd;
    background: rgba(13,110,253,0.07);
    border-radius: 2px;
}

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--color-primary);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(13,110,253,0.08);
    position: relative;
    display: inline-block;
    padding-bottom: 0.3rem;
}
.section-title:after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd 60%, #6610f2 100%);
    margin: 0.5rem auto 0 auto;
    border-radius: 2px;
}

.about-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 8px 32px rgba(13,110,253,0.10);
    transition: transform 0.4s cubic-bezier(.4,2,.6,1), box-shadow 0.4s;
    margin-bottom: 1.2rem;
}
.about-img:hover {
    transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 16px 48px rgba(13,110,253,0.18);
}

.card.project-card {
    border: none;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 4px 24px var(--color-card-shadow);
    transition: background 0.5s, box-shadow 0.3s;
    background: var(--color-bg-section);
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    cursor: default;
}
.card.project-card:hover {
    transform: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.card.project-card:focus {
    outline: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.card.project-card .card-img-top {
    height: 180px;
    object-fit: cover;
    transition: filter 0.3s;
    filter: grayscale(10%) brightness(0.98);
}
.card.project-card:hover .card-img-top {
    filter: grayscale(0%) brightness(1.05);
}
.card.project-card .badge {
    font-size: 0.85rem;
    background: var(--color-badge);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13,110,253,0.10);
}
.card.project-card .btn {
    border-radius: 2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
}
.card.project-card .btn:hover {
    background: #0d6efd;
    color: #fff;
}

.progress {
    background: var(--color-progress-bg);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(13,110,253,0.04);
    overflow: visible;
}
.progress-bar {
    background: var(--color-progress-bar);
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    transition: width 1.2s cubic-bezier(.4,2,.6,1);
}

.icon-skill {
    font-size: 2rem;
    color: #0d6efd;
    margin-right: 0.5rem;
}

.timeline {
    border-left: 3px solid #0d6efd;
    margin-left: 1rem;
    padding-left: 1.5rem;
    position: relative;
}
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1s forwards;
}
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
.timeline-item:before {
    content: '';
    position: absolute;
    left: -1.6rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: #0d6efd;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(13,110,253,0.10);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: none;
    }
}

.list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1.2rem 0.5rem;
    transition: background 0.2s;
}
.list-group-item:hover {
    background: #f1f3f9;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    color: var(--color-link);
    vertical-align: middle;
    transition: none;
}
.contact-icon:hover, .contact-icon:focus {
    color: var(--color-link);
    transform: none;
}

.footer {
    background: var(--color-footer);
    color: #fff;
    padding: 1.2rem 0 0.5rem 0;
    text-align: center;
    margin-top: 3rem;
    letter-spacing: 0.5px;
    font-size: 1rem;
    box-shadow: 0 -2px 16px rgba(13,110,253,0.04);
}

html {
    scroll-behavior: smooth;
}

section {
    background: linear-gradient(135deg, #fff 80%, #f8f9fa 100%);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px var(--color-section-shadow);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.5rem;
    transition: background 0.5s, box-shadow 0.5s;
}
section:hover {
    box-shadow: 0 8px 40px rgba(13,110,253,0.10);
}

@media (max-width: 767px) {
    .about-img {
        width: 110px;
        height: 110px;
    }
    .section-title {
        font-size: 1.5rem;
    }
    section, #testimonials, #blog {
        padding: 1.2rem 0.5rem;
    }
    .card.project-card .card-img-top {
        height: 120px;
    }
    .card.project-card,
    .testimonial-card,
    .blog-card {
        margin-bottom: 1.2rem;
        border-radius: 0.7rem;
        box-shadow: 0 1px 6px rgba(13,110,253,0.07);
        padding: 1rem 0.7rem;
    }
    .blog-card, .testimonial-card, .card.project-card {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .modal-header, .modal-body {
        padding: 1.2rem 0.7rem 0.7rem 0.7rem;
    }
    .modal-title {
        font-size: 1.1rem;
    }
    .timeline {
        margin-left: 0.2rem;
        padding-left: 0.7rem;
    }
    .timeline-item {
        margin-bottom: 1.2rem;
        border-radius: 0.7rem;
        box-shadow: 0 1px 6px rgba(13,110,253,0.07);
        padding: 1rem 0.7rem;
    }
    .list-group-item {
        padding: 0.8rem 0.3rem;
        border-radius: 0.7rem;
        box-shadow: 0 1px 6px rgba(13,110,253,0.07);
        margin-bottom: 0.7rem;
    }
}

.animate-section {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(.4,2,.6,1), transform 0.8s cubic-bezier(.4,2,.6,1);
}
.animate-section.visible {
    opacity: 1;
    transform: none;
}

.progress-bar {
    transition: width 1.2s cubic-bezier(.4,2,.6,1);
}

.card.project-card:focus, .card.project-card:hover {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: 0 16px 48px rgba(13,110,253,0.18);
}

section:focus, .card.project-card:focus, .testimonial-card:focus, .blog-card:focus, .list-group-item:focus, .timeline-item:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

/* Animations for section reveals and cards */
.animate-section.visible > * {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: fadeInUp 0.8s forwards;
}
.animate-section.visible > *:nth-child(1) { animation-delay: 0.1s; }
.animate-section.visible > *:nth-child(2) { animation-delay: 0.2s; }
.animate-section.visible > *:nth-child(3) { animation-delay: 0.3s; }
.animate-section.visible > *:nth-child(4) { animation-delay: 0.4s; }
.animate-section.visible > *:nth-child(5) { animation-delay: 0.5s; }
.animate-section.visible > *:nth-child(6) { animation-delay: 0.6s; }
.animate-section.visible > *:nth-child(7) { animation-delay: 0.7s; }
.animate-section.visible > *:nth-child(8) { animation-delay: 0.8s; }
.animate-section.visible > *:nth-child(9) { animation-delay: 0.9s; }
.animate-section.visible > *:nth-child(10) { animation-delay: 1s; }
.animate-section.visible > * {
    opacity: 1;
    transform: none;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Parallax effect for about-img */
.about-img.parallax {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1);
}

/* Testimonials section */
#testimonials {
    background: linear-gradient(135deg, #fff 80%, #f8f9fa 100%);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px var(--color-section-shadow);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.5rem;
    transition: box-shadow 0.3s, background 0.5s;
}
.testimonial-card {
    background: var(--color-bg-section);
    border-radius: 1rem;
    box-shadow: 0 2px 12px var(--color-card-shadow);
    padding: 1.5rem 1.2rem;
    margin: 1rem 0;
    transition: box-shadow 0.3s, background 0.5s;
    border: none;
    cursor: default;
}
.testimonial-card:hover {
    transform: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.testimonial-card:focus {
    outline: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.testimonial-card .testimonial-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}
.testimonial-card .testimonial-name {
    font-weight: 600;
    color: var(--color-primary);
}
.testimonial-card .testimonial-role {
    color: var(--color-link-hover);
    font-size: 0.95rem;
}

/* Blog section */
#blog {
    background: linear-gradient(135deg, #fff 80%, #f8f9fa 100%);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px var(--color-section-shadow);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.5rem;
    transition: box-shadow 0.3s, background 0.5s;
}
.blog-card {
    background: #f5f7fa !important;
    color: var(--color-text) !important;
    border: 1px solid #e3e6ed;
    box-shadow: 0 2px 12px var(--color-card-shadow);
    border-radius: 1rem;
    padding: 1.5rem 1.2rem;
    margin: 1rem 0;
    transition: box-shadow 0.3s, background 0.5s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: default;
}
.blog-card:hover {
    transform: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.blog-card:focus {
    outline: none;
    box-shadow: 0 4px 24px var(--color-card-shadow);
}
.blog-card .blog-title {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.blog-card .blog-meta {
    color: var(--color-link-hover);
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
}
.blog-card .blog-desc {
    flex-grow: 1;
    color: var(--color-text);
}
.blog-card .blog-link {
    color: var(--color-link);
    font-weight: 500;
    text-decoration: underline;
    margin-top: 0.7rem;
}
.blog-card .blog-link:hover {
    color: var(--color-link-hover);
}

@media (max-width: 767px) {
    #testimonials, #blog, section {
        padding: 1.2rem 0.5rem;
    }
}

/* The full CSS will be updated to include all advanced features as described. */

.navbar-nav .nav-item:last-child .theme-toggle {
    margin-left: 0.75rem;
    margin-right: 0.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    align-items: center;
    height: 40px;
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-item:last-child .theme-toggle {
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .navbar-nav .nav-item:last-child .theme-toggle {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    height: 36px;
  }
}

.navbar-nav .nav-item .theme-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    margin-left: 1rem;
    margin-right: 0.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.navbar-nav .nav-item .theme-toggle i {
    font-size: 1.2rem;
    line-height: 1;
}

.card.project-card,
.card.project-card .card-body,
.list-group-item,
#education .list-group-item {
    background: var(--color-bg-section) !important;
    color: var(--color-text) !important;
}

/* Remove dark mode and theme-toggle styles */
body.dark-mode {
    background: linear-gradient(135deg, #181c24 0%, #232a36 100%);
    color: #f1f3f9;
}
body.dark-mode .navbar {
    background: #181c24 !important;
    color: #f1f3f9;
}
body.dark-mode .navbar-brand, body.dark-mode .navbar-nav .nav-link {
    color: #f1f3f9 !important;
}
body.dark-mode .navbar-nav .nav-link.active {
    color: #ffd43b !important;
    border-bottom: 2px solid #ffd43b;
    background: rgba(255,212,59,0.07);
}
body.dark-mode section,
body.dark-mode #testimonials,
body.dark-mode #blog {
    background: linear-gradient(135deg, #232a36 80%, #181c24 100%);
    color: #f1f3f9;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
body.dark-mode .card.project-card,
body.dark-mode .testimonial-card,
body.dark-mode .blog-card {
    background: #181c24 !important;
    color: #f8f9fa !important;
    border: 1px solid #232a36;
}
body.dark-mode .modal-content {
    background: #181c24 !important;
    color: #f8f9fa !important;
}
body.dark-mode .modal-header {
    background: linear-gradient(90deg, #232a36 60%, #181c24 100%) !important;
}
body.dark-mode .modal-title {
    color: #ffd43b !important;
}
body.dark-mode .modal-body, body.dark-mode .modal-content ul, body.dark-mode .modal-content ul li {
    color: #f8f9fa !important;
}
body.dark-mode .btn-primary {
    background: #ffd43b;
    color: #232a36;
    border: none;
}
body.dark-mode .btn-primary:hover, body.dark-mode .btn-primary:focus {
    background: #ffe066;
    color: #232a36;
}
body.dark-mode .btn-outline-primary {
    border-color: #ffd43b;
    color: #ffd43b;
}
body.dark-mode .btn-outline-primary:hover, body.dark-mode .btn-outline-primary:focus {
    background: #ffd43b;
    color: #232a36;
}
body.dark-mode .contact-icon {
    color: #ffd43b;
}
body.dark-mode .section-title {
    color: #ffd43b;
}
body.dark-mode .footer {
    background: #181c24;
    color: #f1f3f9;
}
body.dark-mode .progress {
    background: #232a36;
}
body.dark-mode .progress-bar {
    background: linear-gradient(90deg, #ffd43b 60%, #ff922b 100%);
}
body.dark-mode .list-group-item {
    background: transparent !important;
    color: #f1f3f9 !important;
    border-bottom: 1px solid #232a36;
}
body.dark-mode .timeline {
    border-left: 3px solid #ffd43b;
}
body.dark-mode .timeline-item:before {
    background: #ffd43b;
    border: 2px solid #232a36;
}
body.dark-mode .blog-meta, body.dark-mode .testimonial-role {
    color: #ffe066;
}
body.dark-mode .section-divider {
    background: linear-gradient(90deg, #232a36 0%, #ffd43b 50%, #232a36 100%);
}
body.dark-mode .blog-card {
    background: #181c24 !important;
    color: #f8f9fa !important;
    border: 1px solid #232a36;
}
body.dark-mode .blog-title {
    color: #ffd43b !important;
}
body.dark-mode .blog-meta {
    color: #ffe066 !important;
}
body.dark-mode .blog-desc {
    color: #f8f9fa !important;
}
.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.5rem;
    color: #ffd43b;
    transition: color 0.2s, background 0.2s;
}
.theme-toggle:focus {
    outline: 2px solid #ffd43b;
    outline-offset: 2px;
}
.theme-toggle i {
    font-size: 1.4rem;
    line-height: 1;
}
@media (max-width: 991.98px) {
    .theme-toggle {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        height: 36px;
        width: 36px;
    }
}
@media (max-width: 767.98px) {
    .theme-toggle {
        margin-left: 0.25rem;
        margin-right: 0.25rem;
        height: 34px;
        width: 34px;
        font-size: 1.2rem;
    }
}
body.dark-mode .btn-close {
    color: #ffd43b;
}
body.dark-mode .btn-close:hover, body.dark-mode .btn-close:focus {
    color: #fff;
}
body.dark-mode .form-control, body.dark-mode .form-control:focus {
    background: #232a36;
    color: #f1f3f9;
    border-color: #444a58;
}
body.dark-mode .form-label {
    color: #ffd43b;
}
body.dark-mode .shadow-sm, body.dark-mode .shadow {
    box-shadow: 0 2px 12px rgba(0,0,0,0.18) !important;
}
body.dark-mode .bg-light {
    background: #232a36 !important;
    color: #f1f3f9 !important;
}
body.dark-mode .text-primary {
    color: #ffd43b !important;
}
body.dark-mode .text-secondary {
    color: #ffe066 !important;
}
body.dark-mode .text-danger {
    color: #ff6b6b !important;
}
body.dark-mode .fa-heart {
    color: #ff6b6b !important;
}

/* Section divider */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #e9ecef 0%, #0d6efd 50%, #e9ecef 100%);
    margin: 3rem 0 2rem 0;
    border-radius: 1px;
    opacity: 0.5;
}

/* Improve typography and spacing */
body, .section-title, .card-title, .blog-title, .testimonial-name {
    letter-spacing: 0.02em;
}
.card-title, .blog-title {
    font-size: 1.25rem;
}
.card.project-card, .testimonial-card, .blog-card {
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
}

/* Only nav and buttons have pointer cursor */
.navbar-nav .nav-link, .btn {
    cursor: pointer;
}

.modal-content {
    background: #f8fafc;
    border-radius: 1.2rem;
    box-shadow: 0 8px 40px rgba(13,110,253,0.13);
    border: none;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    position: relative;
}
.modal-header {
    border-bottom: none;
    border-radius: 1.2rem 1.2rem 0 0;
    background: linear-gradient(90deg, #e9ecef 60%, #f8fafc 100%);
    padding: 2rem 2rem 1rem 2rem;
}
.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}
.modal-body {
    padding: 1.5rem 2rem 0 2rem;
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.7;
}
.modal-content ul {
    margin-top: 1rem;
    margin-bottom: 0;
    padding-left: 1.2rem;
}
.modal-content ul li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}
.btn-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #888;
    opacity: 1;
    transition: color 0.2s;
    box-shadow: none !important;
}
.btn-close:hover, .btn-close:focus {
    color: var(--color-primary);
    outline: none;
}
@media (max-width: 767px) {
    .modal-header, .modal-body {
        padding: 1.2rem 1rem 0.7rem 1rem;
    }
    .modal-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .modal-dialog {
        max-width: 98vw;
        margin: 0.5rem auto;
    }
    .modal-content {
        padding: 0.2rem 0.2rem 0.7rem 0.2rem;
    }
    .modal-header, .modal-body {
        padding: 0.8rem 0.5rem 0.5rem 0.5rem;
    }
    .modal-title {
        font-size: 1rem;
    }
} 